From MythTV Official Wiki
Revision as of 20:31, 16 January 2008 by Rosenbluh (talk | contribs)

Jump to: navigation, search

Important.png Note: The correct title of this article is It appears incorrectly here due to technical restrictions. is a script in the contrib directory that traverses the specified MythTV recordings directory and finds all files with video extensions and checks if they appear in the database. If no entry exists it prompts for identifying information and a recording entry is created.

Let's say you have a recorded program, a *.nuv file for example. And MythTV doesn't know about it (e.g., you copied it from your video directory to a backup location and then deleted it from the MythTV list of recordings). And then you want to re-introduce the recording to MythTV (so the recording shows up again in the list of recordings). How do you do that re-introduction? The script can do that for you.

Here's an example session to re-introduce a recording.

$ cd /video
$ ls *Peach*
$ alias myrbdb=/local/mythtv-src/mythtv-0.20/contrib/
$ mysql -u mythtv -pmythtv mythconverg -e 'SELECT chanid,starttime,endtime,title,subtitle,description FROM recordedprogram WHERE title LIKE "%Peach%"'
chanid	starttime	endtime	title	subtitle	description
1059	2007-08-08 11:00:00	2007-08-08 12:30:00	James and the Giant Peach		A kindly British orphan (Paul Terry) escapes his cruel aunts (Joanna Lumley, Miriam Margolyes) to sail the sea on a giant peach with six friendly bugs. Animated.
$ myrbdb --dbhost localhost --file JamesAndTheGiantPeach.nuv

These are the files stored in (/video) and will be checked against
your database to see if the exist.  If they do not, you will be prompted
for a title and subtitle of the entry, and a record will be created.

Unknown file /video/JamesAndTheGiantPeach.nuv found.
Do you want to import? [y]:
Enter channel [1002]: 1059
... title [JamesAndTheGiantPeach]: James and the Giant Peach
... subtitle:
Description [Recovered file JamesAndTheGiantPeach.nuv]: A kindly British orphan (Paul Terry) escapes his cruel aunts (Joanna Lumley, Miriam Margolyes) to sail the sea on a giant peach with six friendly bugs. Animated.
... start time (YYYY-MM-DD HH:MM:SS) [2007-08-18 20:33:23]: 2007-08-08 11:00:00
... duration (in minutes) [60]: 90
Building a seek table should improve FF/RW and JUMP functions when watching this video
Do you want to build a seek table for this file? [y]:
2007-08-20 13:12:19.260 Using runtime prefix = /usr/local
2007-08-20 13:12:19.348 New DB connection, total: 1
2007-08-20 13:12:19.366 mythcommflag version: 0.20.20060828-3
2007-08-20 13:12:19.374 Enabled verbose msgs: important

MythTV Commercial Flagger, started at Mon Aug 20 13:12:19 2007
Rebuilding SeekTable(s) for:
ChanID  Start Time      Title                                      Status
------  --------------  -----------------------------------------  ------
2007-08-20 13:12:21.400 New DB connection, total: 2
1059    20070808110000  James and the Giant Peach                  2007-08-20 13:12:21.554 Using protocol version 30
 99%/ 1935fpsRebuilt

Finished commercial break flagging at Mon Aug 20 13

Version Notes

Version 0.0.3 (installed with Ubuntu's Gutsy Gibbon) does not seem to work with the --file command. As a workaround use the --ext command.


On Ubuntu 7.04 at least, you require the libtime-format-perl package installed.