show dvd burn jobs running in background in main menu and fix potential crash on...
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / Process.py
index 3cf874c0b3ad16265c1c9d4eb40b107bad986bb5..946b44ad13767c73ae9187fd8b6960b23513ec7b 100644 (file)
@@ -126,7 +126,7 @@ class DemuxTask(Task):
                        self.currentPID = str(int(line.rstrip()[-6:].rsplit('0x',1)[-1],16))
 
        def haveNewFile(self, file):
-               print "[DemuxTask] produced file:", file
+               print "[DemuxTask] produced file:", file, self.currentPID
                self.generated_files.append(file)
                if self.currentPID in self.relevantAudioPIDs or file.endswith("m2v"):
                        self.mplex_streamfiles.append(file)
@@ -368,6 +368,9 @@ class CheckDiskspaceTask(Task):
                self.global_preconditions.append(DiskspacePrecondition(diskSpaceNeeded))
                self.weighting = 5
 
+       def abort(self):
+               self.finish(aborted = True)
+
        def run(self, callback):
                failed_preconditions = self.checkPreconditions(True) + self.checkPreconditions(False)
                if len(failed_preconditions):
@@ -599,7 +602,7 @@ class Menus:
                        menuoutputfilename = job.workspace+"/dvdmenu"+num+".mpg"
                        spumuxTask(job, spuxmlfilename, menubgmpgfilename, menuoutputfilename)
                
-def CreateAuthoringXML_simple(job):
+def CreateAuthoringXML_singleset(job):
        nr_titles = len(job.project.titles)
        mode = job.project.settings.authormode.getValue()
        authorxml = []
@@ -771,7 +774,10 @@ class DVDJob(Job):
                CheckDiskspaceTask(self)
                if self.project.settings.authormode.getValue().startswith("menu") or self.menupreview:
                        Menus(self)
-               CreateAuthoringXML_multiset(self)
+               if self.project.settings.titlesetmode.getValue() == "multi":
+                       CreateAuthoringXML_multiset(self)
+               else:
+                       CreateAuthoringXML_singleset(self)
 
                DVDAuthorTask(self)