[mythtv-users] Viedo2ipod script error

Jeff Simpson jeffsimpson at alum.wpi.edu
Wed Apr 16 17:24:17 UTC 2008


>  Yes, it will probably work for now, but not 2 years from now when
>  someone finds this in the archive and follows these instructions. It
>  would be much better if no scripts did any modifying of the
>  mythconverg database directly.

Agreed!

>  If all you're doing is an update to the basename, then maybe something
>  should be added to the perl bindings to move a recoding to a new
>  directory. Do the update there and then just call the new "move
>  recording" function. Pass it the object and new location and let the
>  bindings update the database so it can all be maintained in one area
>  and other scripts can make use of it.

I look forward to your patch :-P

Seriously, though, it's a good idea - but a change to the perl
bindings wouldn't make their way into the general population until the
next myth release, and this script might be completely defunct by then
anyway if nobody wants to use it.

What if I included some database schema checks? That would at least
ensure that it knew what it was doing (like, if I know that basename
was added in XXXX, and the most recent version is YYYY, I could make
sure the script will only do the rename if the schema version is
between XXXX and YYYY. I can always update YYYY to the latest version
if the relevant fields have not changed any, but any user of the
script would be manually hacking to get that, and thus they would be
on their own.

Perhaps there IS a perl binding that allows updating programs? I know
you can get program data in a hash. Maybe there is a way to then
"save" that data? Anybody familiar with the perl bindings want to lend
some advice? I never found any documentation for it, I just read
through the source and took functions that looked useful, then used
Data::Dumper on the resulting hashes to guess at their contents - then
took parts from myth.rename to do the renaming.

 - Jeff


More information about the mythtv-users mailing list