[mythtv-users] Fast Question about Mythrename.pl

Michael T. Dean mtdean at thirdcontact.com
Mon May 21 17:21:32 UTC 2007


On 05/21/2007 12:22 PM, Douglas Wagner wrote:
>      Got a frontend/backend on one system, have a NAS that is serving 
> as active storage on another system across a 100bt wired link.
>
> Recordings go to my local /video directory and will then be moved 
> across the wire (via myth_archive_job.pl) to one of the two nas 
> recording areas (Video 1 or Video 2).  Obviously this creates sim 
> links in the local /video directory.  MythTV is setup to "follow sim 
> links" upon delete so all is good there.
>
> My question surrounds mythrename.pl.  If I were to want to run this 
> guy to re-name shows, will he work "through sim links" or would I have 
> to run this guy on the NAS box and then some way re-name the created 
> sim links?

I /highly/ recommend you never rename MythTV recording files.  Instead, 
use "mythrename.pl --link" to create "pretty" symlinks to the recording 
files (or recording links).

> Maybe the better question is: considering the setup i've explained 
> above, what's the best way to re-name the 1092_20070516120000.mpg 
> files that I get to something slightly more meaningful so that I can 
> access the show in the local /video directory by a name that is 
> comprehensible (yet still play these things through myth).  I really 
> don't care what the file name on the NAS is, so long as MythTV can get 
> rid of it upon delete.  If the answer is to have a sim link in /video 
> of a valid name pointing to a 1092.....file on the nas, i'm good with 
> this so long as Myth can properly delete.

Put the links in a separate directory so you don't have all the other 
"junk" in there (i.e. PNG thumbnail images, ugly-named recordings, 
etc.).  Also, "mythrename --link" will delete /all/ symlinks under the 
provided link directory (so it would delete the ugly-Myth-named links as 
well as the pretty mythrename links, leaving orphaned recordings).

And, that's what deletes the old symlinks--mythrename.pl, not Myth.  So, 
for example, I run mythrename.pl --link on a cron job at 1 and 31 past 
the hour (nearly all shows I record start on the half hour).  Sure, I 
may have a recording or two for which I don't have a link or for which I 
have a link right after I delete the recording--for up to half an 
hour--but if I really need to, I can always run "mythrename.pl --link" 
myself.

In fact, though, I never run mythrename.pl directly.  I have a little 
"wrapper" script that creates various "views" using different formats 
for the names (attached).  That means that each view--when sorted 
alphabetically (or ASCII-betically, as the case may be)--gives me 
differently-sorted recordings lists.  The list sorted by original 
airdate lets me know what order to watch the episodes.  The list sorted 
by recording starttime lets me easily find the newest recordings. ...

> Also as another side item (unrelated) anyone have a fast for loop 
> command to take all the *.mpg files in /mnt/video1 and link them to 
> /video?  I've done this before but I forget the command I used.

Have you looked at myth_archive_job.pl (which has nothing to do with 
MythArchive, BTW)?

Mike
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mythlink.sh
Url: http://mythtv.org/pipermail/mythtv-users/attachments/20070521/1569fd2d/attachment.diff 


More information about the mythtv-users mailing list