[mythtv-users] recording name does not match database
Michael T. Dean
mtdean at thirdcontact.com
Wed Jun 16 17:27:26 UTC 2010
On 06/16/2010 05:03 AM, F P wrote:
> I have a mythbuntu 9.04 64bit working installation.
> For several reasons I had to reinstall from scratch, still 9.04 64bit.
> Before doing that, I did run the backup script mythconverg_backup.pl
> as suggested here, on the mythbuntu upgrading page.
> After 9.04 reinstallation, I stopped the backend, drop the database,
> created a new one and finally restored the database with the twin
> script mythconverg_restore.pl.
>
> All recordings are there, as well as channels ids and so on.
> But the recordings point to the wrong filenames!
> It seems somewhere in the process of backup/restore, the database was
> converted from "numbered filenames" to "pretty filenames".
> For instance, a "dr house" manual recording previously pointing to
> "1000_20100613211000.mpg" now points to a file named "dr house (Manual
> Record) - 2010-06-13, 9-10 PM - Sun Jun 13 21-10-00 2010.mpg".
>
> Is there any way I can rebuild the correct links between the database
> and the real files?
>
> I've tried renaming a file to the name the database expects, and it
> works, but doing that for 100+ recordings drives me crazy!!!
MythTV doesn't do any file renaming (as part of normal usage or
upgrades/backups/...). The deprecated mythrename.pl script used to do
so, but it has been replaced by a new script mythlink.pl, which only
allows creating pretty, human-readable symlinks to recording files. We
explicitly removed the ability to rename files because of the problems
it causes (with file name length limitations imposed by the file system,
file system or OS file name reserved character differences, character
encoding issues, etc.).
Therefore, the only way you could have a backup with file names that do
not match your recording files (assuming only MythTV-related programs
ever touched the database) is if someone ran mythrename.pl (the old,
deprecated script) after the backup was created (and used a really
messed up format specifier).
I don't see much of any way to fix the issue other than manually
renaming the files (while it's easy to determine the proper file names,
determining the current file names and how they relate to recorded
program entries is much more challenging). You can use the following
query to get some information, which you could open in a spreadsheet
program and use to figure out which file is for which recording.
cat<< "EOF" | mysql -u mythtv -p mythconverg 2>&1 | tee ~/recordings.txt
SELECT title, subtitle, chanid, starttime, endtime, basename
FROM recorded;
EOF
Mike
More information about the mythtv-users
mailing list