[mythtv-users] SQL Tables for recordings.

Michael T. Dean mtdean at thirdcontact.com
Thu May 19 16:22:58 UTC 2005


Mat Mrosko wrote:

>I am just wondering if anybody knows what tables (besides "recorded"
>and "recordedmarkup") hold information about the recorded shows... I
>copied some recordings from a friend's box (the NUVs, and the relavent
>information from recorded (i commercial flagged myself again, to be
>sure)) and everything seemed to go smoothly... I can watch the shows,
>the commflags are correct, but for some reason in MythWeb, I do not
>get a preview image.  I have disabled the "live preview" in the
>frontend and changed it to use a thumbnail, and it just shows black,
>and in my frontend log I get some "Unable to find image:
>1249_340329428034823098420384_092384283048234820834.nuv.png" or
>whatever.
>  
>
OK.  I don't know if you're just making up filenames on your Myth box or 
for this e-mail, but the filename is important and the one you show is 
not of the correct format.  The filename should be:

SCCC_YYYYMMDDHHmmSS_YYYYMMDDHHmmSS.nuv

Where S is the source ID, CCC is the channel number, YYYY is the year, 
MM is the month, DD is the day, HH is the hour, mm is the minute, and SS 
is the seconds.  The date/time on the left is the start time, the one on 
the right is the end time.  (I'll admit I don't have any experience with 
multiple backends, but I would assume that even in that case the 
filename format is identical.)

>Is there some other table that I need to get some data from for this
>to work properly?
>  
>
My recommendation is to start over.  Ideally, do the following as the 
mythtv user.  If you do the actions as any other user, make sure that 
your mythtv user owns all the files (and has appropriate permissions on 
them).  I'm making up a filename, but it's one of the appropriate format.

$ mv 1249_20050516195800_20050516210000.nuv MyShow
$ touch 1249_20050516195800_20050516210000.nuv

We rename the file to ensure that it's not deleted by Myth, then create 
an empty file so Myth thinks the file is there.  At this point, we're 
ready to delete the recording using MythTV (to ensure that all the stuff 
you have in there--including the seektable information from the 
recordedmarkup table--is removed).  Don't manually delete it.  At this 
point, your database should be clean, so you can use the following steps 
to "import" the recording.

$ mv MyShow 1249_20050516195800_20050516210000.nuv
$ myth.rebuilddatabase.pl --dbhost=localhost

(where myth.rebuilddatabase.pl is a script in the contrib directory of 
the source distribution of MythTV)  Type in the appropriate title, 
subtitle, and description for the show once the script finds it (if you 
had the right name before, the script may find the appropriate 
information automatically since you just deleted a recording with that 
info).

$ mythcommflag -f 1249_20050516195800_20050516210000.nuv

Once mythcommflag completes its run, MythTV (directly or via MythWeb) 
will be able create the preview image.

Although this is probably similar to what you may have already done, the 
key points are:
  a. make sure you start this process from a clean database (don't do 
any manual insertions and if you make a mistake or start down one path 
to find you were not using the right process, start over as described above)
  b. use the correct format for the filename (if you don't, the 
myth.rebuilddatabase.pl script will let you know)
  c. use the tools to do the work for you (they won't make mistakes).

>P.S. If I don't get an answer within a couple of days, I'll probably
>post this on the dev list!
>
No need.  This is not a bug in Myth.  It's bad data in your database.  :)

HTH,
Mike


More information about the mythtv-users mailing list