Import (and Scrape) Recorded Movies from MythTV into the Movies Database?
#1
Lightbulb 
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?
Reply
#2
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
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
#3
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.
Reply
#4
Just curious, what EPG are you using there in NZ?
Reply
#5
ethan_9219 Wrote:Just curious, what EPG are you using there in NZ?

I'm using a python XMLTV grabber. http://nice.net.nz/tv_grab_nz-py/

http://www.gossamer-threads.com/lists/my...vnz/290834
Reply
#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.
Reply
#7
Supposing someone was interested in refactoring some of the CMythDirectory code... Who would they talk to regarding a code review?
Reply
#8
elupus mainly. you can get our attention easiest by attaching a patch on trac
Reply
#9
I've started with a small patch to the Video Info Scanner to get the ball rolling on formal support for this.

http://trac.xbmc.org/ticket/6560
Reply
#10
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.
Reply
#11
theophile Wrote: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.

Thanks for that great information! programid is available through libcmyth so I have exposed that through the DLL wrapper XBMC. I am checking whether it starts with "MV" to identify a recording as a movie.

That worked for about 50% of the "movies" that we have recorded through MythTV so I assume our less than great EPG is to blame for the rest. To cater for that, I've also added support for an advanced settings variable so the length of the recording can additionally be used to further identify something as a movie.

Quote:<mythtv>
<movielength>100</movielength>
</mythtv>

For our mythconverg database the programid was only filled in for those entries in the recordedprogram table where the category_type was "movie". According to the MythTV code, the start of the programid (if it exists) should match on the category_type with the mappings: "MV" = movie, "EP" = series, "SP" = sports, "SH" = tvshow.

Are you able to run a query over your mythconverg database to see how often the programid is filled in? We are using 0.21.

Quote:select category_type, programid from recordedprogram;

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Import (and Scrape) Recorded Movies from MythTV into the Movies Database?0