Freesat UK EPG - Series / Episode filenaming issue.
Added by Paraic McDonagh about 6 years ago
Hi,
I'm running TVHeadend on an Ubuntu box, which is serving various CoreElec boxes in my home.
I have DVB-T2 and DVB-S2 tuners picking up Irish (Saorview) and UK Freesat channels.
My core objective is to have my "Recorded TV" shows appearing in the TV (library) section of Kodi.
I have pretty good population of the EPG because I've setup custom grabbers for xmltv.co.uk, koditvepg2.com as well as the relevant included grabbers. In a nutshell the issue seems to be that TVHeadend is not adding the Series/Episode detail to the filename from the program's EPG metadata. This seems to be because episode information, although usually included in the program's description, is not in the right place for TVHeadend to recognise it. But I might be missing something. Does anyone have Freesat UK or Sky UK recordings configured successfully to show up in the TV section of Kodi, or even have TVH adding episode information to each filename?
Any help with this would be appreciated.
Replies (6)
RE: Freesat UK EPG - Series / Episode filenaming issue. - Added by Martin Underwood about 6 years ago
I use TVHeadend's web interface rather than Kodi as the front end to TVH, and I can control the filename that is generated. I've found that including Subtitle in the filename is a dead loss because UK Freeview seems to use the Subtitle field for both the episode title and a long multi-sentence plot summary - and this results in very long and cumbersome filenames! My Configuration | Recording | Format String is $t/$t-%Y%m%d-%H%M$-c.$x to create a separate folder for each programme name, and then a file named "progname-YYMMDD-HHMMSS-channame.ts".
This is on a Raspberry Pi 3B+, but it may well be similar for Ubuntu on (for example) Intel hardware.
I set up the standard UK-specific EPG grabbers "Over the air: EIT: DVB Grabber" (priority 1) and "Over the air: UK: Freeview" (priority 5). I've no idea what the significance of the two priority numbers is, and why they are not 1 and 2 :-) IIRC, without "UK: Freeview" I only got listings for DVB-T channels, and not for DVB-T2 (mainly HD) channels.
RE: Freesat UK EPG - Series / Episode filenaming issue. - Added by Paraic McDonagh about 6 years ago
Thanks for taking the time to reply. Can I ask; are your files which have the date, time and channel information in the filename, successfully added to the TV Shows library?
RE: Freesat UK EPG - Series / Episode filenaming issue. - Added by Em Smith about 6 years ago
In you use the dev version of tvh (4.3) then we added a $q format specifier (config->recording->profiles). Use it as "$q$n.$x".
This automatically splits your recordings in to tvshows and tvmovies, creates a subdirectory per tvshow, and creates a name such as "tvshows/Bones/Bones - S02E06".
The tvh 4.3 also has better scraping, so it now extracts season/episode/sub-title.
Even with this, you'll have mixed results. Part of the problem is the tvdb has their own numbering for some series and episodes, even when it is wrong. So, my broadcaster who made the episode says it's "S5E4", but tvdb insist it's S0E2.
Some providers such as SchedulesDirect give tvdb episode numbers in the xmltv data they provide to help work around this.
Even with this, you may find you record something (say News), that will not not be scraped so not enter the lists.
For movies, the scraping mostly works; but sometimes Kodi will scrape the completely wrong movie due to the year being different to what their scraper expects.
RE: Freesat UK EPG - Series / Episode filenaming issue. - Added by Paraic McDonagh about 6 years ago
That sounds like exactly what I need. I will upgrade to v4.3 tomorrow and test it out. I spent half of today fixing picons already after running channel mapping by accident, so time to take a break from it for now. I might try and also include the channel, date and time as per Martin's post. Would that help TVDB scrape the info in cases where series information can't be found in the filename? It does sound as though this is the fix I'm looking for because, with UK Freesat EPG data, the series/episode information is usually somewhere in the sub-title. I'm not too concerned with adding programs such as News and Movies or one off shows, it's the recurring series type TV show that I'm interested in. I was actually considering raising parsing the sub-title for episode details, as a feature request so it's a timely addition! You devs are doing a great job with TVH it has to be said. Many thanks!
RE: Freesat UK EPG - Series / Episode filenaming issue. - Added by Em Smith about 6 years ago
Remember to take a backup first (entire .hts directory) since it can be difficult to downgrade.
AFAIK, the tvdb scraper doesn't care about channel name, etc., just title + season+episode; it ignores things like sub-title and other text.
The tvheadend scraper settings are located in the epg module settings so you need to tick the boxes on each grabber and then rescan; you should then see season/episode info, at least for the most common cases.
An alternative is using xmltv such as SchedulesDirect (around $20pa). There's a grabber that runs under kodi (sd4tvh), and others that run independently. They're tricky to set up, but for UK channels they provide good data and automatically set all your channel icons for you (assuming tick boxes ticked...) They provide very good information such as season/episode, cast, extended categories, etc.
RE: Freesat UK EPG - Series / Episode filenaming issue. - Added by Paraic McDonagh about 6 years ago
OK, Well I upgraded to 4.3 today. I didn't see your message until now so I didn't backup the .hts directory. I guess there's no going back now.
I had an issue where some of my channel icons were overwritten because Configuration->Channel/EPG->EPG Grabber->General settings: Update Channel Icon: was checked. When I unchecked it and refreshed the icons, the paths were restored correctly but after clearing the PVR database in Kodi, no icons at all were displayed.
I got to the bottom of it after reading this post, which has the fix: https://forum.libreelec.tv/thread/1253-libreelec-tvheadend-local-kodi-fetching-picons-very-slowly-and-with-curl-timeout/?postID=86589#post86589
Anyway, I digress. I tried both "$q$n.$x" and "$t/$t-%Y%m%d-%H%M$-c.$x" as suggested, without much success. Both resulted in the intended file naming structure alright, they just didn't scrape into the TV Shows library.
In the end, I read the documentation and came up with "$t/$t $c %F %R $e.$x" Which works very well for me.
It's shorthand for "ProgramTitle/ProgramTitle ChannelName ISODate 24hrTime EpisodeInfo.FileExtension" The directory/filename produced will look something like this: "Kirstie and Phil's Love It or List It/Kirstie and Phil's Love It or List It More4 2018-10-09 16-55 S03E03.ts" Note I used spaces as delimiters. It might not be necessary to include the channel name as you say, or date and time info, but it seems to work OK, so I'm leaving it for now. Some clients might not like space delimiters so you may need to use _ or something else if this is an issue.
So in summary:
There's probably no need to upgrade to the development version of TVH (Though it's fairly straightforward to do).
In Configuration->Recording, under Filesystem Settings:Format string/Pathname specification: put "$t/$t $c %F %R $e.$x" (without quotes) into the textbox. The resulting filenames should then scrape into the TV Shows library.