MythTV recorded shows into the TV Shows library database
#1
Lightbulb 
I use XBMC as the front end to watch recorded Myth TV shows because the media handling in XBMC is much better than what the native Myth TV front end provides.

What would need to happen to get the listing of Myth TV recorded shows (available right now through the myth:// protocol) into the TV Shows Library in XBMC?

Much of the information available via myth:// (originally obtained from the EPG on the Myth TV server and augmented by Myth TV with things like a thumbnail icon from the actual recording) should be able to be slotted into the various fields the XBMC TV Shows library needs.

I looked at writing a scraper that could point to a myth:// source and simply push information about the TV show directly into the XBMC library but the scraper functionality appears to need a season and episode number pulled from the filename, which is then used to hit a web resource to get the additional information. Unfortunately, the season and episode numbers are not likely to exist within the electronic program guide (EPG) that most PVRs use (XMLTV) - well they don't in New Zealand at any rate. Also, myth:// appears to expose a lot of the information most scrapers hit the likes of theTVDB to get so the need for actually scraping might be redundant.

[HTML]<!ELEMENT programme (title+, sub-title*, desc*, credits?, date?,
219 category*, language?, orig-language?, length?,
220 icon*, url*, country*, episode-num*, video?, audio?,
221 previously-shown?, premiere?, last-chance?, new?,
222 subtitles*, rating*, star-rating* )>[/HTML]

With the recorded shows appearing in the XBMC Library you get all the benefits of fanart, and native skin support for watching the TV shows.

Are there any other avenues that could be looked at to get the information about the recorded programme exposed by myth:// into the XBMC TV Show Library?

Even a solution that fixed the season number to 1 and the episode number to the index of the known recorded show for that program within Myth TV would be workable if the rest of the TV Show Library data was pushed in directly from what myth:// exposes? But how would one even go about doing this?

Are there any avenues that could be looked at to get the information about the recorded program exposed by myth:// into the XBMC TV Show Library?
Reply
#2
First port of call is to see if the broadcasters here in New Zealand plan on putting the season and episode numbers into the EPG.

If that is possible (highly unlikely I suspect) then I'll ask elupus nicely if they could be put into the file listings that are returned from the myth:// protocol somehow.

If that is possible then in theory another RegEx could be added to the tvshowmatching setting in AdvancedSettings.xml to work with what myth:// returns and the existing TV scrapers might work.
Reply
#3
I think the main problem is that recorded shows are generally in a state of flux - most people don't keep stuff around all that long in general, so adding to the library needs a really robust method of making sure that any files are removed at the appropriate stage and so on.

We have a google summer of code student (alcoheca) working on PVR/EPG integration, so expect to see some progress over the (northern hemisphere) summer. I'm sure he'll be more than happy to receive information about what freeview et. al. provide and possible ideas to incorporate the data. As you say, information from thetvdb.com may in fact be overkill if the EPG provides most of the data you normally have.

Cheers,
Jonathan

PS: Nice to have another NZer on the board.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
I'm getting old as my memory is lapsing. I asked a similar question ages ago at http://forum.xbmc.org/showthread.php?tid=27229.

Now I've moved on from the old python script to the new myth:// protocol support though.
Reply
#5
jmarshall Wrote:PS: Nice to have another NZer on the board.

Yay, another Kiwi entrenched in cutting edge XBMC.

I'd be happy enough with manually removing from the library and then having it ask if it should delete the actual file as well. Currently we delete the file through the XBMC interface.

And you're right, our pattern for watching recorded TV is probably slightly different to that of people watching a downloaded season of a particular TV show. For example, sometimes we just want to see what was recently recorded to figure out what to watch. Other times we want to see what shows we're behind in.

Perhaps I'm just getting too caught up in the Aeon skin eye candy that's hopefully going to be released for TV Shows. Would be nice having them all in one place though.
Reply
#6
dteirney Wrote:First port of call is to see if the broadcasters here in New Zealand plan on putting the season and episode numbers into the EPG.

Someone "in the know" on the Myth TV NZ mailing list confirms that it's unlikely we'll see any form of series or episode numbers in the EPG data. Rats.

Quote:There are no plans for this from freeview, but the are looking at
supporting some of the "EIT actual" extensions as well as the series
link functions freeview UK supports. These should appear around the same
time as the "official" PVRs.

Official PVRs won't be around for some time yet (months and months) and I'm not sure the series linking information will actually be helpful for this.
Reply
#7
I think that this idea falls under the "One unified PVR/DVR/HTPC front-end (client GUI)" concept, and it is not limted to MythTV.

I think that the scraper API could probably be made to import the TV Show episodes from MythTV, (it sure seems to have the potential anyway), but the scraper API would first have to be extended first to support getting the data from the MythTV database library instead of the file-name, ...and maybe that alone is not enough, maybe the database API on the MythTV back-end side have to be extended as well to expose this information to XBMC scrapers.

You might have to post this feature request to the MythTV developers, it would be good if it could be worked on from both sides.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
I had actually pondered this idea before. My solution was to have myth transcode all my shows after recording, then to have natbur's TvRenamer monitoring the output folder for my transcodes. Once they were done TvRenamer can automatically move them to the appropriate folder where they would be picked up in the next autoscan. The only problem was that his TvRenamer needed season and ep # to scrape info from thetvdb.com.

I had a quick chat with him and he suggested that since most pvr's have access to similar data on the backend (but not ep. # & season) that he might be able to rewrite the TVRenamer to use SeriesName, EpisodeName, and OriginalAirDate to find the info from thetvdb. That way if there is any discrepancy in airdate or the way the pvr named the episode it could get sorted out with a fallback. It seems that perhaps in the case of pvr's, that the xbmc scraper could be extended to do the same since this information is available through myth://

Just a thought.
Reply
#9
Gamester17 Wrote:You might have to post this feature request to the MythTV developers, it would be good if it could be worked on from both sides.

I've posted similar comments/questions on what I have found to be the most active MythTV front end thread for XBMC at http://forum.xbmc.org/showthread.php?tid=2297&page=47.

I think I might have burnt my question allocation there though. Been posting quite a bit of late...

Is there anywhere else that you think I could post?
Reply
#10
Rand Al Thor Wrote:It seems that perhaps in the case of pvr's, that the xbmc scraper could be extended to do the same since this information is available through myth://

I'm not entirely sure who the developers are that are doing all this great stuff. It looks like elupus is doing the majority of the myth:// work.

If we could convince someone who knows about the TV Show Library and scrapers and someone that knows what myth:// reliably exposes under the hood and how cool it would be if the recorded TV shows showed up in the library then there might be some magic.
Reply
#11
dteirney Wrote:I've posted similar comments/questions on what I have found to be the most active MythTV front end thread for XBMC at http://forum.xbmc.org/showthread.php?tid=2297&page=47.

I think I might have burnt my question allocation there though. Been posting quite a bit of late...

Is there anywhere else that you think I could post?
No you misunderstod me, I meant that you might have to turn to the MythTV back-end developers (over at www.mythtv.org) to ask them if they can expose the season and episode information on their side, (I did not mean that you should request this from XBMC's MythTV front-end developers in a other topic-thread on our forum).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#12
Gamester17 Wrote:No you misunderstod me, I meant that you might have to turn to the MythTV back-end developers (over at www.mythtv.org) to ask them if they can expose the season and episode information on their side, (I did not mean that you should request this from XBMC's MythTV front-end developers in a other topic-thread on our forum).

Right, whoops. Wasn't sure that was necessary as the information appears to already be in the MythTV database in the Recorded Program table.

I've done some more digging though and XBMC appears to use the CMyth API which is probably using the Query Recordings command via the Myth Protocol. It's all starting to make a bit more sense now.

It doesn't appear we are going to get episode and season numbers in our XMLTV data feed in New Zealand for the EPG though, so exposing them via the Myth Protocol won't help Sad

That Query Recordings API appears to support the original air date though. That combined with the series name might be enough to scrape something like theTVDB to get any additional information to push the recording into the TV Shows library as suggested by someone else (almost certainly not possible at theTVDB at the moment - and may never be).

The original air date isn't currently being exposed by the CMyth Program struct used by libcmyth.dll which I'm guessing the myth:// protocol is using directly. After looking at my latest XMLTV file there are no date entries filled in, so it doesn't look hopeful we will get the original air date either...

Unless there is a direct mapping between the data held in the MythTV database and what the XBMC TV Shows Library expects then it might not even be possible to scrape anywhere to get any additional information needed (at least with the sparse New Zealand XMLTV data).

Might spend more time looking at this when I'm back from leave at the end of June.

If anyone can point me to a definition of the data fields needed for the TV Shows library in XBMC that would be a great start.
Reply
#13
It would also be useful if a movie was recorded that it show up in the Movies library rather than TV Shows Library.

Not sure there is anything in the XMLTV feed to identify something as being a movie. Perhaps something rule like if the recording was longer than 90 minutes then it was treated as a movie would workHuh
Reply
#14
In the meantime a cool alternative would be to do something similar to what the PS3 does which is have the shows selectable by title, genre and date. This could be another menu under "Recordings".

If I knew how to code I would take a look myself, but unfortunately shell scripting is about my limit.

Regards,
Hitman
Reply
#15
I think mythrename.pl and mythnuv2mkv.pl might be of help here.

As far as I could get was using mythrename.pl to convert show names to include the title, subtitle and original airdate. I think with that and the chunks of the script that author specifies in comments here http://web.aanet.com.au/auric/?q=node/6 will rename the shows again with S##E##. Which is where I'm stuck.

Anybody else work something out with that?
Reply

Logout Mark Read Team Forum Stats Members Help
MythTV recorded shows into the TV Shows library database0