X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FPlugins%2FExtensions%2FDVDBurn%2FProcess.py;h=80e5899b03d982f50619e8b6937060e1b8539cb6;hp=d0c9d3c63c0b973448139f5fd2e5f36066b57d62;hb=189694cba5501834e95e4fb6b38b0b97ffbc04ac;hpb=58e983040ccc2e6a0bda18430342142f7932fd26 diff --git a/lib/python/Plugins/Extensions/DVDBurn/Process.py b/lib/python/Plugins/Extensions/DVDBurn/Process.py index d0c9d3c..80e5899 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Process.py +++ b/lib/python/Plugins/Extensions/DVDBurn/Process.py @@ -109,10 +109,11 @@ class DemuxTask(Task): def processOutputLine(self, line): line = line[:-1] + #print "[DemuxTask]", line MSG_NEW_FILE = "---> new File: " MSG_PROGRESS = "[PROGRESS] " - MSG_NEW_MP2 = "--> MPEG Audio (0x" - MSG_NEW_AC3 = "--> AC-3/DTS Audio on PID " + MSG_NEW_MP2 = "++> Mpg Audio: PID 0x" + MSG_NEW_AC3 = "++> AC3/DTS Audio: PID 0x" if line.startswith(MSG_NEW_FILE): file = line[len(MSG_NEW_FILE):] @@ -123,7 +124,10 @@ class DemuxTask(Task): progress = line[len(MSG_PROGRESS):] self.haveProgress(progress) elif line.startswith(MSG_NEW_MP2) or line.startswith(MSG_NEW_AC3): - self.currentPID = str(int(line.rstrip()[-6:].rsplit('0x',1)[-1],16)) + try: + self.currentPID = str(int(line.split(': PID 0x',1)[1].split(' ',1)[0],16)) + except ValueError: + print "[DemuxTask] ERROR: couldn't detect Audio PID (projectx too old?)" def haveNewFile(self, file): print "[DemuxTask] produced file:", file, self.currentPID @@ -166,7 +170,10 @@ class DemuxTask(Task): if failed: import os for file in self.generated_files: - os.remove(file) + try: + os.remove(file) + except OSError: + pass class MplexTaskPostcondition(Condition): def check(self, task): @@ -372,11 +379,11 @@ class CheckDiskspaceTask(Task): self.finish(aborted = True) def run(self, callback): + self.callback = callback failed_preconditions = self.checkPreconditions(True) + self.checkPreconditions(False) if len(failed_preconditions): callback(self, failed_preconditions) return - self.callback = callback Task.processFinished(self, 0) class PreviewTask(Task): @@ -392,8 +399,12 @@ class PreviewTask(Task): if self.job.menupreview: self.previewProject() else: - from Tools import Notifications - Notifications.AddNotificationWithCallback(self.previewCB, MessageBox, _("Do you want to preview this DVD before burning?"), timeout = 60, default = False) + import Screens.Standby + if Screens.Standby.inStandby: + self.previewCB(False) + else: + from Tools import Notifications + Notifications.AddNotificationWithCallback(self.previewCB, MessageBox, _("Do you want to preview this DVD before burning?"), timeout = 60, default = False) def abort(self): self.finish(aborted = True) @@ -668,7 +679,7 @@ def CreateAuthoringXML_singleset(job): authorxml.append('\n') authorxml.append(' \n') authorxml.append(' \n') - authorxml.append(' \n') + authorxml.append(' \n') authorxml.append(' \n') authorxml.append(' \n', ) if mode.startswith("menu"): @@ -680,7 +691,7 @@ def CreateAuthoringXML_singleset(job): authorxml.append(' \n') authorxml.append(' \n') if mode.startswith("menu"): - authorxml.append(' \n') + authorxml.append(' \n') authorxml.append('