[mythtv] [PATCH] Import Recordings

Chris Pinkham cpinkham at bc2va.org
Sun Aug 3 20:57:59 EDT 2003


Couple ideas to maybe make this better:

* make it an setting option to scan for new files.
* for mpeg2 files, fire off a commercial flagger to get the seektable into
	the database.
* maybe good to just fire off commercial flagging always if the user has
	"Automatic commercial flagging" turned on.  You could fire this off as
	a thread same as above.
* maybe this could be integrated with the manual recording screen if
	there was a way/button to manually scan for new files you could use
	the entry box idea from the manual recording screen to fill in info
	about new files.

It's also been talked about about making a new packet type in the .nuv
file that would contain the program info so that you could easily move
files between myth boxes.  Your scan function could then just read the
new packet to get the info.  You might look into this as well if you're
up to it. :)

> Here's a patch to add new .nuv files to the database if there's no 
> existing entry for them. This will only work for software encoded files, 
> hardware encoded files aren't supported since the seektable is stored in 
> the database. New files are added when you go to the Watch Recordings 
> screen. If the original filename is preserved an entry is added in 
> similar style to manual recording entries, otherwise it attempts to 
> parse a useful entry from the filename (eg. The Simpsons - Episode 
> 107.nuv will be split at the dash). The file is renamed to match it's 
> corresponding db entry.
> 
> Known issues: This opens up a whole new can of worms. MythTV wasn't 
> designed to interact with things outside it's own environment. If you 
> drop a bad .nuv file in there, Watch Recordings will get stuck in an 
> ugly loop (although it keeps running and you can get out). Who knows 
> what the decoder would do if you import a correct .nuv with really nasty 
> errors in it. If you are moving things in and out of the recordings 
> directory by the filesystem instead of the myth interface you'll end up 
> with a lot of entries pointing to non-existing files, as it appears myth 
> doesn't delete bad entries from the database. Apply at your own risk.

-- 

Chris



More information about the mythtv-dev mailing list