This is generated with a script every morning at 6am, and pulls the data from Freeview directly, 8 days worth of data. It then attempts to get posters from IMDB, TheTVDB, TVNZ OnDemand, ThreeNow, Choice TV and HGTV. Most big shows have posters, but those that don’t have placeholder images. It’s also pretty good at finding matches, but not always 100%. I can fix specific shows, so let me know and I can make some changes. It also correctly identifies movies 99.9% of the time, however there could be some shows that are shown as movies when they’re not, let me know if thats the case. It also automatically detects new channels and adds them to the xml, meaning the only changes need to be made in Plex.
Great job @shea9872! I have literally been working on exactly the same thing for the last 2 weeks because Plex’s one is so bad. I came on here tonight to see if Plex might have plans now that they have the new guide out. I’ve imported your XML file as a comparison to mine and I see there are a few miss matches in there. For example, the movie Top Gun on Bravo tonight at 8:30pm is being reported as a TV episode rather than a movie. Out of interest, how have you programmed your guide to be created? Perhaps we could share notes and make one ultimate one guide?
Firstly my script pulls the data from Becoming Elizabeth. This is obviously the easy bit, since most of the data is there for us. The first kinda ‘extra’ part of my script now comes into play - using a bunch of regex I extract the season, episode and part number of each show. This is then saved to a file. If there is no season number, then I set the original air date to either the current date, or to a date from the cache (e.g. When it first appeared in my script).
The next bit is deciding whether a particular program is a TV show or a movie. This is easy for some channels - e.g. TVNZ, Choice TV, Maori TV etc. since they add a ‘Feature’ or ‘Movie’ tag to movies, however it is much trickier for Mediaworks channels. This is because they don’t provide a movie tag in the genre, so instead my script looks for the year in brackets in the description (for example ‘(2016)’). This is likely why Top Gun isn’t displaying correctly, as it probably doesn’t have a year in the description. I’ll see if I can see some sort of pattern I can use to determine whether it is a movie.
The last step is the metadata collection process. If a show is a TV show, then we check the TVDB, which searches for the show and usually picks the first one with a similar title, unless one of them is produced by a New Zealand company (e.g. TVNZ, in which case it gets selected over the others). If it is a movie then I check with IMDB, via the OMDB api. This also allows me to get the cast and ratings. This data is also cached.
This is a pretty broad overview, I’d have to double check the script again for some of the nuanced details. If you have any more question feel free to send me a PM.
Thanks for that - I didn’t even realise Freeview has a nice XML file to deal with. What I’ve been working with so far is from EPG Collector download | SourceForge.net which lets you grab the EPG sent out with the frequency we all tune in to. This also outputs directly in to the XMLTV format to be used straight away if you want. Just running it only does have the job though. I take all the data as a head start and then do various checks against https://www.thetvdb.com/ and http://www.tvmaze.com/ for TV shows and also against http://www.omdbapi.com/ for movies - they each have good APIs to work with. I actually quite like tvmze.com as it also allows you to submit any TV programme that isn’t in their DB yet from NZ. I did have big ambitions when I first started but, once I got the data from the EPG, I realised it wasn’t going to be as simple with NZ deciding to either change programme names enough (from what it actually is) or provide little to no information about what episode/season it is. I’ve been able to create a reasonable little script to find the correct series (when available) but there is still some manually work. I’ve reached the point where I either need to commit to it and make it available online (currently just running off my local web server) as Plex prefers some assets being available publicly available or see if there is something else out there. I do like what you decided to do when you couldn’t find a poster image - much better than the empty box Plex provides when it doesn’t know.
Out of interest, what TV tuner are you using? How long does it generally take for a channel to start playing once you click the play button? Seems to take a while for my one which can be frustrating - though the tuner works very quick when used outside of Plex.
@johnm_ColaSC said:
Just a suggestion but if there is no season or episode couldn’t you assume it is a movie? Or are shows often aired with no season/episode where you are at?
It would be nice if there was a full set of data available with each airing. Unfortunately most cases provide you with the name of the programme and maybe a very brief synopsis as to what it is. Even the series name is different from the official title which makes lookups against other databases very difficult. Most movies are at least 80 minutes but some TV episodes are longer than 90 minutes so it is even hard to base it off time.
This is generated with a script every morning at 6am, and pulls the data from Freeview directly, 8 days worth of data. It then attempts to get posters from IMDB, TheTVDB, TVNZ OnDemand, ThreeNow, Choice TV and HGTV. Most big shows have posters, but those that don’t have placeholder images. It’s also pretty good at finding matches, but not always 100%. I can fix specific shows, so let me know and I can make some changes. It also correctly identifies movies 99.9% of the time, however there could be some shows that are shown as movies when they’re not, let me know if thats the case. It also automatically detects new channels and adds them to the xml, meaning the only changes need to be made in Plex.
Great job @shea9872! I have literally been working on exactly the same thing for the last 2 weeks because Plex’s one is so bad. I came on here tonight to see if Plex might have plans now that they have the new guide out. I’ve imported your XML file as a comparison to mine and I see there are a few miss matches in there. For example, the movie Top Gun on Bravo tonight at 8:30pm is being reported as a TV episode rather than a movie. Out of interest, how have you programmed your guide to be created? Perhaps we could share notes and make one ultimate one guide?
Firstly my script pulls the data from Becoming Elizabeth. This is obviously the easy bit, since most of the data is there for us. The first kinda ‘extra’ part of my script now comes into play - using a bunch of regex I extract the season, episode and part number of each show. This is then saved to a file. If there is no season number, then I set the original air date to either the current date, or to a date from the cache (e.g. When it first appeared in my script).
The next bit is deciding whether a particular program is a TV show or a movie. This is easy for some channels - e.g. TVNZ, Choice TV, Maori TV etc. since they add a ‘Feature’ or ‘Movie’ tag to movies, however it is much trickier for Mediaworks channels. This is because they don’t provide a movie tag in the genre, so instead my script looks for the year in brackets in the description (for example ‘(2016)’). This is likely why Top Gun isn’t displaying correctly, as it probably doesn’t have a year in the description. I’ll see if I can see some sort of pattern I can use to determine whether it is a movie.
The last step is the metadata collection process. If a show is a TV show, then we check the TVDB, which searches for the show and usually picks the first one with a similar title, unless one of them is produced by a New Zealand company (e.g. TVNZ, in which case it gets selected over the others). If it is a movie then I check with IMDB, via the OMDB api. This also allows me to get the cast and ratings. This data is also cached.
This is a pretty broad overview, I’d have to double check the script again for some of the nuanced details. If you have any more question feel free to send me a PM.
Thanks for that - I didn’t even realise Freeview has a nice XML file to deal with. What I’ve been working with so far is from EPG Collector download | SourceForge.net which lets you grab the EPG sent out with the frequency we all tune in to. This also outputs directly in to the XMLTV format to be used straight away if you want. Just running it only does have the job though. I take all the data as a head start and then do various checks against https://www.thetvdb.com/ and http://www.tvmaze.com/ for TV shows and also against http://www.omdbapi.com/ for movies - they each have good APIs to work with. I actually quite like tvmze.com as it also allows you to submit any TV programme that isn’t in their DB yet from NZ. I did have big ambitions when I first started but, once I got the data from the EPG, I realised it wasn’t going to be as simple with NZ deciding to either change programme names enough (from what it actually is) or provide little to no information about what episode/season it is. I’ve been able to create a reasonable little script to find the correct series (when available) but there is still some manually work. I’ve reached the point where I either need to commit to it and make it available online (currently just running off my local web server) as Plex prefers some assets being available publicly available or see if there is something else out there. I do like what you decided to do when you couldn’t find a poster image - much better than the empty box Plex provides when it doesn’t know.
Out of interest, what TV tuner are you using? How long does it generally take for a channel to start playing once you click the play button? Seems to take a while for my one which can be frustrating - though the tuner works very quick when used outside of Plex.
I use the Hauppauge WinTV-quadTV it’s quite good, however I think the tuning speed is much more dependant on your system rather than you card. For example my previous system running a celeron was very slow, however my new system, running an old Xeon is much better.
I considered using EPG Collector, however I couldn’t find a precompiled Linux binary, and there didn’t seem to be anyway to run it on a headless Linux system anyway. From what I could tell running it on Windows, it seems to have very similar data to the XML file I use, which is what I would’ve expected, since that file is used by the Freeview app. The only issues that really need sorted are the movie thing and perhaps some miss matches - which in all honesty isn’t a huge issue.
@shea9872 said:
I use the Hauppauge WinTV-quadTV it’s quite good, however I think the tuning speed is much more dependant on your system rather than you card. For example my previous system running a celeron was very slow, however my new system, running an old Xeon is much better.
I considered using EPG Collector, however I couldn’t find a precompiled Linux binary, and there didn’t seem to be anyway to run it on a headless Linux system anyway. From what I could tell running it on Windows, it seems to have very similar data to the XML file I use, which is what I would’ve expected, since that file is used by the Freeview app. The only issues that really need sorted are the movie thing and perhaps some miss matches - which in all honesty isn’t a huge issue.
Yea I got the Hauppauge quad as well. I run a i5-6500 with 16GB RAM which I figured would be plenty of power to do this don’t you think? It can take around 10 seconds or so to load if its going well. The times it does come up quicker I then sit on buffering for another 10 seconds. I’m hoping I just need to play around a bit more with Plex configuration to get it going better. Guess I’m so used to streaming movies and other video content from Netflix, YouTube, XBox that I’m used to it being so instant
Are you getting plex to download it from the link (http://nzxmltv.github.io/xmltv/guide.xml) or is it a directory on your computer? It needs to be from the link so that program updates will happen (or else the guide will eventually run out of programs, since its only 8 days), it also means that when new channels are added (or updated) it can happen automatically.
That’s where I went wrong, I saved the XML file to the c:\ as was suggested in the path
Re done it all again and using http://nzxmltv.github.io/xmltv/guide.xml in the path and all is working now
Cheers
I’ve thought about this before. Personally I prefer it, since it means I can record new episodes of the programme, rather than other older episodes which might be marked as new (e.g. If a broadcaster doesn’t mark an older show as a repeat)