[mythtv-users] Viedo2ipod script error

Brad DerManouelian myth at dermanouelian.com
Wed Apr 16 17:40:11 UTC 2008

On Apr 16, 2008, at 10:24 AM, Jeff Simpson wrote:

> I look forward to your patch :-P

Just saying it's the right way to do it. If I ever write a script that  
needs it, I'll write it and let you know. ;)

> 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.

True... and another reason you should submit your script to be added  
to the contrib directory so people can take advantage of something  
like this that would be version-specific. It would work in trunk and  
whenever the next release happens for general use.

> 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.

Unnecessary. If people hack your script, it's not your job to make  
sure it still works. I was just sending out a warning that if they  
break something that they shouldn't ask you to fix it.

> 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.

I just poked through the source and didn't see anything, but  
MythTV::Recordings looks like it would be a good place to start. Maybe  
pass it something that says, "Add this recording" instead of "Get this  
recording". Chris Petersen should really be the one with the say in  
how it happens and if it should happen at all.

More information about the mythtv-users mailing list