[mythtv-users] MythWeb filename to actual filename

Owen Townend owen.townend at gmail.com
Wed Apr 8 11:48:36 UTC 2009


2009/4/8 David Fishburn <dfishburn.mythtv at gmail.com>:
[snip]
> My rudimentary shell scripting produced this script which does what I need.
> If someone can offer any improvements on it terrific.
> I actually have to check 2 locations, since I stored recordings in 2
> different locations.  I just removed the second check from the script.
> I don't know if it is possible to ask Myth for the recording directory
> locations (to make the script more generic) but it is a simple change
> as is if things move.
>


One way of grabbing the full path for the file:

***************

me at myth $ perl -e 'use MythTV;
my $basename=shift;
my $myth = new MythTV();
$connect = $myth->{'dbh'};
my $storagegroup = new MythTV::StorageGroup();
$dir = $storagegroup->FindRecordingFile($basename);
print "DIR=$dir\n"' \
"${RECORDING_CHAN}_${RECORDING_DATE}.mpg"

DIR=/media/mythtv/recordings/1001_20080924213800.mpg

***************

cheers,
Owen.


More information about the mythtv-users mailing list