Posts: 838
Joined: Jul 2007
Reputation:
6
2009-05-10, 08:30
When we record stuff with MythTV we generally have a mix of Movies, TV Series and one-off TV shows.
It would be nice if the recorded Movies were pulled out and made available in the Movie library. Often we feel like watching a movie and having to go between our actual Movie library and the myth:// source listing is harder than it ought to be (especially since it's hard to see what are movies through the existing myth:// interface).
A simple way of doing that might be to use the current code that gets the list of MythTV recordings, but then only include recorded content that was longer than say 110 minutes (including commercial breaks). In theory that should be relatively easy to do.
Can anyone think of any reason why this wouldn't work before I give it a go? Off the top of my head there might need to be a RegExp for shows to ignore as some one off TV shows we record are longer than 110 minutes (normally sports related stuff).
Perhaps an extension would be to also add a "Movies" entry to the current list of "All Recordings", "LiveTV", "Guide", "Recordings By Title". Perhaps that "Movies" virtual directory could simply be the thing that is given a content type and then scanned to the library?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Ideally the backend would signal the type of media, as that's the best place to get it from. Pulling out movies as you suggest in a separate listing would be quite a nice idea. Once that's done, the scanning side should be reasonably straight forward I think?
Cheers,
Jonathan
Posts: 838
Joined: Jul 2007
Reputation:
6
Coding up a first cut of that was pretty easy given the existing code already did something similar for the recordings by title. I now have a Movies "directory" that only returns recorded shows longer than 100 minutes long.
The MythTV database does have a category type field in one of the tables, but this doesn't always seem to be filled in with "Movie" for the TV we have recorded. Likely due to the lack luster quality of the EPG we have here in New Zealand. And, as luck would have it (Murphy's luck that is) that field doesn't appear to be retrievable using the existing libcmyth code.
I also had to manually tidy up some of the recording names in the MythTV database using mythfrontend to remove stuff like "Monday Night Movie: " or "Sunday Night Blockbuster: " as I'm pretty sure the XBMC scrapers would have some issue with that.
I'll try setting the content type of that virtual Movies directory tomorrow night and see what happens. By all accounts this might just magically work. XBMC rocks!
I'm considering coding up some other changes as well. Top level directories would be:
* All Recordings - as is now
* Live TV - as is now
* Guide - as is now
* TV Shows - goes through to a folder for each show (filter would be for recordings < 100 minutes). If the EPG supported it, the new scraper for episode information based on original air date could be used to scan this into the TV library in XBMC. Basically a tweaked version of "Recordings By Title"
* Movies - goes directly to each movie (filter would be for shows > 100 minutes)
In future the filter to decide between TV Show and Movie could be enhanced.
Posts: 346
Joined: Sep 2008
Reputation:
0
Just curious, what EPG are you using there in NZ?
Posts: 838
Joined: Jul 2007
Reputation:
6
Out-of-the box the scanning of content for my new Movies directory didn't work as it was trying to use the filename to scrape the movie content. And, not surprisingly the filenames bear no resemblence to the title of the movie (they look like 1002_20081229203000.mpg)
HOWEVER, after an hour or so of reviewing the varied places that interact with Scrapers I made some code changes and now it's actually working! Un freaking believable!
I had to:
1) Change the VideoInfoScanner to use the label from the ListItem as the movie name for movies, if the label was "preformatted". I saw similar code for TV Shows so "borrowed" that.
2) Altered CMythDirectory to set the preformatted label flag to true, with some other minor tweaks formatting the name.
So right now I have about another dozen movies sitting in our Movie Library after having downloaded the good stuff from the internet! And they are playing back with automatic skip of the commerical breaks! TEH AWESOME.
Posts: 838
Joined: Jul 2007
Reputation:
6
Supposing someone was interested in refactoring some of the CMythDirectory code... Who would they talk to regarding a code review?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
elupus mainly. you can get our attention easiest by attaching a patch on trac
Posts: 568
Joined: Jan 2009
Reputation:
30
It should be possible to use the MythTV program IDs to determine what is a movie and what isn't. Genres are in the TV listings and MythTV generates IDs appropriately. For example, here's a program ID for a movie, having a "MV" prefix:
MV000359510000
Here's one for a TV episode, having an "EP" prefix:
EP007322830110
That way short TV movies (often 90 minutes or less) don't get left out, and 2-hour season finales do.