Skip to content

Commit

Permalink
Fixed mythburn.py to send UTC timestamps to mythtranscode.
Browse files Browse the repository at this point in the history
Introduces new dependencies on dateutil and pytz.
  • Loading branch information
Rod Roark committed Jul 3, 2013
1 parent c9accc2 commit 012a648
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mythplugins/mytharchive/mythburn/scripts/mythburn.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
import unicodedata
import time
import datetime

import dateutil.parser
from pytz import timezone

import tempfile
from fcntl import ioctl
import CDROM
Expand Down Expand Up @@ -1706,16 +1710,18 @@ def runMythtranscode(chanid, starttime, destination, usecutlist, localfile):
cutlist_s += "'"
write("Using cutlist: %s" % cutlist_s)

utcstart = dateutil.parser.parse(starttime).astimezone(timezone('UTC')).isoformat()

if (localfile != ""):
if usecutlist == True:
command = "mythtranscode --mpeg2 --honorcutlist %s --infile %s --outfile %s" % (cutlist_s, quoteCmdArg(localfile), quoteCmdArg(destination))
else:
command = "mythtranscode --mpeg2 --infile %s --outfile %s" % (quoteCmdArg(localfile), quoteCmdArg(destination))
else:
if usecutlist == True:
command = "mythtranscode --mpeg2 --honorcutlist --chanid %s --starttime %s --outfile %s" % (chanid, starttime, quoteCmdArg(destination))
command = "mythtranscode --mpeg2 --honorcutlist --chanid %s --starttime %s --outfile %s" % (chanid, utcstart, quoteCmdArg(destination))
else:
command = "mythtranscode --mpeg2 --chanid %s --starttime %s --outfile %s" % (chanid, starttime, quoteCmdArg(destination))
command = "mythtranscode --mpeg2 --chanid %s --starttime %s --outfile %s" % (chanid, utcstart, quoteCmdArg(destination))

result = runCommand(command)

Expand Down

0 comments on commit 012a648

Please sign in to comment.