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

Tom Lichti tom at redpepperracing.com
Thu Dec 22 21:32:29 EST 2005


Michael T. Dean wrote:
> Tom Lichti wrote:
>
>> Michael T. Dean wrote:
>>
>>> MythTV wrote:
>>>
>>>> #857: Patch to mythrename.pl to work correctly with slave backends
>>>> -------------------------------------+-------------------------------------- 
>>>>
>>>> Reporter:  tom at redpepperracing.com  |       Owner:  ijr     Type:  
>>>> patch                    |      Status:  new Priority:  
>>>> minor                    |   Milestone:      Component:  
>>>> mythtv                   |     Version:  head
>>>> Severity:  low                      |  
>>>> -------------------------------------+-------------------------------------- 
>>>>
>>>> This small patch updates mythrename.pl to use the hostname when 
>>>> deciding
>>>> what records to process. I only use the --link option, so further 
>>>> testing
>>>> may be required. 
>>>
>>> If you check for hostname with the query, we won't get links to 
>>> recordings recorded on other backends, even if the file exists on 
>>> the filesystem (i.e. multiple backends share a recordings directory 
>>> using NFS).  Since mythrename.pl checks for the existence of the 
>>> file before creating the link, we shouldn't need to do this check.  
>>> As is, we (should) only get links to recordings that are available 
>>> through the filesystem and recordings whose filies are not available 
>>> are (should be) ignored.
>>>
>>> If there's a specific problem/error you're trying to fix, more info 
>>> would be nice...  :) 
>>
>> Hrm. Well, in my case, using the --link option on both my master and 
>> slave backends creates the same links on both, so something isn't 
>> working. I'll see if I can narrow it down some more. At a quick 
>> glance, I don't see where the check for the file existence is being 
>> done, but I'm no perl expert. 
>
> Hrmmm.  It seems that mythlink.sh had it, but mythlink.pl (which 
> eventually became mythrename.pl) never got it...
>
> So, how's this?  It should also make for many less "restores" after 
> rename fails on inaccessible files...  Good catch.
>
> If it works, you can post it on your ticket as a replacement for your 
> patch (since this should meet both our expectations :).
>
> Thanks (and, thanks especially for noticing my reply on the list 
> instead of only watching the ticket),
> Mike
That seems to do it! I'll update the ticket.

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

Tom


More information about the mythtv-dev mailing list