[mythtv-users] Filenames and UTC

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Apr 30 11:47:25 UTC 2013


On Tue, 30 Apr 2013 10:48:55 +0100, you wrote:

>Since switching my main box to 0.26, and with DST now in force in the 
>UK, I'm running into cases where the filename being used to access a 
>recording is based on local start time, and the process fails.
>
>One example is in my mythDVBcut script; it ought to be changed but at 
>present I can correct on entry.  Another is in MythArchive:
>
>Node = starttime, Data = 2013-04-01T20:28:00+01:00
>
>Pre-processing recording 5: '/mnt/sam1/recb/1002_20130408202800.mpg'
>
>Result: 34, Command was mytharchivehelper -q -q --getfileinfo --infile 
>"/mnt/sam1/recb/1002_20130408202800.mpg".......
>
>where the filename is actually 1002_20130408192800.mpg
>
>There are clearly many ways of mending this; I looked on the wiki and 
>found things like %PROGSTARTUTC%  for use in setting up a user job, but 
>it isn't clear how I would use it in the cases above.
>
>Can anyone recommend a simple general solution that already exists? 
>bash and/or python wanted.
>
>TIA
>
>John P

Scripts should not be creating file names from the start times, if
that is what is going on here.  The correct filename for each
recording is in the recorded.basename field.  And if you are starting
with the filename, you can use the basename field to look up the
correct chanid and starttime key fields to identify the correct row in
the recorded table to get the starttime and other data for the
recording.  The fact that the file name for a recording just happens
to have been built originally with the start time in it does not mean
that should be used as it is possible to change the file name to
something else completely different as long as the recorded.basename
field is updated to the new name.


More information about the mythtv-users mailing list