[mythtv] Re: [mythtv-commits] Ticket #857: Patch to mythrename.pl to work correctly with slave backends

Michael T. Dean mtdean at thirdcontact.com
Thu Dec 22 22:53:50 EST 2005

Tom Lichti wrote:

> Michael T. Dean wrote:
>> Thanks.  BTW, it's easier for the devs if you attach the file instead 
>> of putting it in the text (which can lead to copy/paste errors of 
>> varying severity from annoying to won't-apply to 
>> applies-but-won't-compile to 
>> applies-and-compiles-but-doesn't-function-properly).  Normally, you 
>> post your, "This patch ..." message and /after/ submitting it, view 
>> the ticket and use the "Attach File" button to attach the file.
> I knew that, but I figured for a 1 line patch it wasn't worth it. My bad.

You may be right.  I guess now they have a choice.  :)

>>> There are a couple of other things that mythlink did that mythrename 
>>> doesn't... :)
>>> 1) It doesn't delete old links for shows that have been deleted (I 
>>> just add an rm * but it's pretty brutal)
>> Are you sure?  It should remove any links (even ones it didn't create 
>> ;) in the destination directory before starting to create links and 
>> should die if it fails to remove any of them (so you should get all 
>> or nothing).  Lines 226-229 - 
>> http://svn.mythtv.org/trac/browser/trunk/mythtv/contrib/mythrename.pl?rev=8364#L225 
>> .
>> BTW, it works for me.
> Hrm. Might be related to the fact that I added that whole 
> sub-directory thing... :)

Yeah.  Since it only checks the destination directory (and not subdirs), 
that would be the problem.  The old mythlink.sh used to "rm -rf" the 
whole destination directory, so that's why it worked.

>>> 2) I like to organize the links by making a folder for each show, 
>>> and then just have the shows listed by title and date (again, I 
>>> hacked mine, but not nicely)
>> I'm doing a slightly easier thing that may work for you.  Instead of 
>> grouping shows by folder, I create several folders with different 
>> "views" of the files--each sorted differently.  I have a script 
>> (mythlink.sh) which creates the views (so I can run a single cron job 
>> to create them all).
>> When changing from the old mythlink.sh to mythlink.pl, I created the 
>> script as a "functional replacement" of the "upgraded" mythlink.sh 
>> (not the 0.18.1 and below version) in case packagers/etc. wanted it.  
>> Chris decided that the script didn't really warrant inclusion in the 
>> contrib directory and I agreed, but I'm including a copy here for 
>> your viewing.  (You'll need to edit the values at the top as 
>> described in the comments.)
> Perfect! I'll use this and then I'll stop complaining... :)

Although I'll admit that your approach had one benefit mine didn't: you 
could list the directories to quickly see/count what different titles 
you have available.  (Didn't lose sight of the forest for the trees.)

If you know of a not-so-hackish way to do this (you mentioned you hacked 
yours), you could add a ticket.  If not, maybe someone more creative 
than I will help figure one out.  Of course, as deep in the thread as 
we've taken this, the request probably won't be seen by anyone who could 
help.  If you really want the ability, you may want to start an "any 
ideas" thread on -users...


More information about the mythtv-dev mailing list