[mythtv-users] File name of recorded program

Michael T. Dean mtdean at thirdcontact.com
Fri Aug 31 03:59:44 UTC 2007


On 08/30/2007 10:06 PM, John Pierce wrote:
> When I record something from within mythtv the resulting file name is
> some like 1245_2007date-time.mpg, is it possible to tell mythtv to
> give the file the name of the program instead of the numbers date and
> time?

No.

There exists a script, however, called mythrename.pl that can be run to
rename shows using any of a number of formats.  However, I highly
recommend that you don't use it to do so--there are some issues that
will cause problems if you rename files (there are patches in Trac for
those I know about, but there may be other issues).

Instead, mythrename.pl accepts an argument "--link" that tells it to
create a directory of nicely-named symlinks that refer to the recording
file (with its original name).

Benefits of this approach:
    a) Myth still works and you don't have any of the issues that occur
when you rename the recording files
    b) Your directory of well-named links doesn't include a bunch of PNG
preview images that get in the way when trying to find a show to watch
    c) You can create /multiple/ directories of links--each with shows
named in different formats--allowing you to easily find the show you
want to watch regardless of what information you're using to find it.

I use the --link approach (and I do /not/ rename the original
recordings).  I have a cron job that runs a script that creates 5 views
of recordings using different formats that cause an ls to sort them by
start time/title, title/start time, recording group/title/starttime,
category/title/start time, and title/original airdate.

Or, you can just create a single view with:

mythrename.pl --link /mythtv/views
              --format '%T/%Y%m%d-%H%i-%eH%ei-%S'
              --separator '-' --replacement '_'

If using a Samba share to access the recordings, you'll want to disable
Unix extensions on the share so that the link is treated as a file (not
as a link).

Mike


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mythlink.sh
Url: http://mythtv.org/pipermail/mythtv-users/attachments/20070830/70e17338/attachment-0001.diff 


More information about the mythtv-users mailing list