Allow Mythfilldatabase to populate episode data for eit

What would you like to see in MythTV and why? Find others who might want to help implement your ideas!
Forum rules
Please be reasonable and positive with your feature requests, remember that all contributions to MythTV are by volunteers in their spare time. MythTV won't support piracy in any form, including torrents and use of soft cams, so to avoid embarrassment please do not ask.

* One suggestion per thread please. Do not post new suggestions in replies. *
Post Reply
luc5588
Junior
Posts: 39
Joined: Sat Dec 19, 2015 11:13 am
Reunion

Allow Mythfilldatabase to populate episode data for eit

Post by luc5588 »

I use eit but I'd like to get the important missing episode metadata from xmltv. This should allow better artwork lookups especially when viewing with kodi where some skins fetch extra metadata. I don't want title/subtitle/description to update so would like an option similar to only-update-channels for only-update-episode-data.

Reason:

I have decent EIT on most channels but they rarely populate season, episode, totalepisodes or cast. Other channels don't populate subtitle or simply have a title, no subtitle, a generic description, and a unique programid. Some programs might list a season but not an episode, or an episode and not a season.

I think if ProgramInfo::InsertDB and mythfilldatabase had an option to update only season, episode, totalepisodes fields and only if chanid, starttime, endtime match an existing record it would allow a metadata lookup. I don't want title/subtitle to change since it affects dup matching.

So, ProgramInfo::InsertDB would have something similar to this:

"if (!season.null() && !episode.null()) { ... "Update program set season=:season, episode=:episode, totalepisodes=:totalepisodes where chanid=:chanid and starttime=:starttime and endtime=:endtime"; }"

and ProgramData::HandlepPrograms would have some extra arg to only do episodes.

Maybe it should be split in to separate update statements with a "and x is null" clause so:

"if (!season.null())...update program set season=:season where chanid=:chanid and starttime=:starttime and endtime=:endtime and (season is null or season=0)"

Seems we might need partnumber and parttotal too since we have episodes in xml of:
<episode-num system="xmltv_ns">0.0/2.</episode-num>

I don't use xmltv for the main episode data since they often they don't have data for the repeat channels or data is faked and invalid, eg the broadcast timeshift +1 hour channel might not be showing a film since the broadcaster only paid to show it once, but xmltv simply fakes the data and assumes the film is broadcast, or the data might not take in to account that the channel goes off air in the middle of the programme.

Also xmltv often didn't have unique details for some shows so would just have "sport - continuing coverage of events in X" and it was too painful trying to get rules to record when everything was apparently a dup, whereas eit had unique programids.

So, I no longer use xmltv.

However, it occurred to me that using eit and matching xmltv against chanid, starttime, endtime (not title and subtitle) then I'd get the best of both worlds. I'd get great metadata on most recordings. On mismatches due to xmltv data being wrong, I'd be no worse off. On shows where xmltv has no extra data then I'd be no worse off. By not updating title/subtitle/programid, it also means existing dup rules will work where xmltv has no data at all for some channels.

We can't match on title/subtitle since there are a lot of different fixups applied in both mythtv and xmltv.
User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: Allow Mythfilldatabase to populate episode data for eit

Post by dekarl »

luc5588 wrote:I use eit but I'd like to get the important missing episode metadata from xmltv.
We do not support mixing and matching EIT with XMLTV inside a channel, but you can mix and match the guide source on channel level. E.g. Sports channels from EIT, movie channels from XMLTV.
As mixing and matching multiple guide sources is a black art this is not going to work reasonable well in a mythical way. It is always going to be a manually guarded process.
Another way could be using Shepherd to integrate EIT and your guide feed with manual rules to test the concept. "Just" set it up with one of the EIT to XMLTV grabbers and tv_grab_fr_kazer as source and teach it how it goes together.
luc5588 wrote:However, it occurred to me that using eit and matching xmltv against chanid, starttime, endtime (not title and subtitle) then I'd get the best of both worlds. I'd get great metadata on most recordings. On mismatches due to xmltv data being wrong, I'd be no worse off. On shows where xmltv has no extra data then I'd be no worse off. By not updating title/subtitle/programid, it also means existing dup rules will work where xmltv has no data at all for some channels.

We can't match on title/subtitle since there are a lot of different fixups applied in both mythtv and xmltv.
What is your guide source? (I guess it may be Kazer, after comparing the channel list on Wikipedia for Canalsat Réunion and Parabole Réunion to the channel list of Kazer) Have you considered working with them on the issues you mention? E.g. when the +1 channel is not an exact copy they may be able to source a second feed from the tv station. Or to base a guide feed on the transmitted guide mixed with a second feed. But that is all per-channel / per-series stuff that is best done centrally.

PS: With regard to capturing the cast from EIT. There is a mode of data transfer that we do not implement yet. Just look at the raw data with dvbsnoop and watch out for "items" like "Actor" or "Cast". Here is an example of such data in the wild in Brazil.
luc5588
Junior
Posts: 39
Joined: Sat Dec 19, 2015 11:13 am
Reunion

Re: Allow Mythfilldatabase to populate episode data for eit

Post by luc5588 »

Thanks. I looked at that but it seemed very complicated.

Instead I wrote a small perl script to parse a downloaded xmltv guide and update the db program season/episode/year for entries for a channel that have the same start and end time if that entry did not already have those details. I added a custom recording rule to prefer recordings with a season/episode/year. I already restart mythbackend every night so it gets the new details. It seems to work ok since mythfrontend now shows the correct episode details in recorded programmes. As you say, mixing eit/xmltv sources isn't really supported and my code might break in the future.
Post Reply