[mythtv-users] MythWeb filename to actual filename

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 3 15:37:00 UTC 2009


On 04/03/2009 11:10 AM, Steve Heistand wrote:
> On Fri, 3 Apr 2009 08:44:04 -0400, David Fishburn wrote
>   
>> How do you map this URL:
>>     mythweb/tv/detail/1010/1238544000
>>
>> To the actual filename on the filesystem?
>>
>> I would have thought there would be a:
>>     recordings/1010_1238544000.mpg
>>
>> But there isn't.
> #!/bin/csh
>
> set path=$1
> set stamp=`echo $path | /usr/bin/awk -F'/' '{print $NF}'`
> set chan=`echo $path | /usr/bin/awk -F'/' '{print $(NF-1)}'`
> set date=`/bin/date -d @${stamp} '+%Y%m%d%H%M%S'`
> set file="${chan}_${date}"
> echo $file
> ####
>
> the file extension you will have to add in yourself as from just the mythweb path
> you wont know it.
>
> but something like
>
> prompt: cp `script_name mythweb/tv/detail/1010/1238544000`.* /new/path/
>
> might work. but it also would copy the thumbnails

Or, just use mythrename.pl --link...  I have my system set up to run it 
5 different times every half hour, creating 5 different directories 
sorted differently.  And, mythrename.pl --link will give you good 
filenames /after/ the copy--meaning that when you throw them on the 
laptop, you'll know which shows to watch and in what order.

http://www.gossamer-threads.com/lists/mythtv/users/331410#331410 has the 
script I run and explains the sorting.

Mike "The wheel has already been invented" Dean


More information about the mythtv-users mailing list