allow gstreamer to signalize missing plugins to the gui (requires reconfiguring enigm...
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / Process.py
index 74f23f1512fdb24cc5f78f9c23a4e8acbb2a5c7b..c89f79c957191dc721e2493ea3b71f0cc31c26a5 100644 (file)
@@ -1,4 +1,5 @@
-from Components.Task import Task, Job, job_manager, DiskspacePrecondition, Condition, ToolExistsPrecondition
+from Components.Task import Task, Job, DiskspacePrecondition, Condition, ToolExistsPrecondition
+from Components.Harddisk import harddiskmanager
 from Screens.MessageBox import MessageBox
 
 class png2yuvTask(Task):
@@ -264,7 +265,7 @@ class BurnTask(Task):
                self.postconditions.append(BurnTaskPostcondition())
                self.setTool("/bin/growisofs")
                volName = self.getASCIIname(job.project.settings.name.getValue())
-               self.args += [ "-dvd-compat", "-Z", "/dev/cdroms/cdrom0", "-V", volName, "-publisher", "Dreambox", "-use-the-force-luke=dummy" ]
+               self.args += [ "-dvd-compat", "-Z", harddiskmanager.getCD(), "-V", volName, "-publisher", "Dreambox", "-use-the-force-luke=dummy" ]
                self.args += extra_args
 
        def getASCIIname(self, name):
@@ -302,7 +303,7 @@ class BurnTask(Task):
                                self.error = self.ERROR_SIZE
                        elif line.find("write failed") != -1:
                                self.error = self.ERROR_WRITE_FAILED
-                       elif line.find("unable to open64(\"/dev/cdroms/cdrom0\",O_RDONLY): No such file or directory") != -1: # fixme
+                       elif line.find("unable to open64(") != -1 and line.find(",O_RDONLY): No such file or directory") != -1:
                                self.error = self.ERROR_DVDROM
                        elif line.find("media is not recognized as recordable DVD") != -1:
                                self.error = self.ERROR_NOTWRITEABLE
@@ -662,7 +663,7 @@ class DVDJob(Job):
                DVDAuthorTask(self, diskSpaceNeeded)
                
                nr_titles = len(self.project.titles)
-               
+
                if self.menupreview:
                        PreviewTask(self)
                else:
@@ -705,18 +706,3 @@ class DVDdataJob(Job):
                        CopyMeta(self, title.inputfile)
                BurnTask(self, ["-follow-links", self.workspace])
                RemoveDVDFolder(self)
-
-def Burn(session, project):
-       j = DVDJob(project)
-       job_manager.AddJob(j)
-       return j
-
-def PreviewMenu(session, project):
-       j = DVDJob(project, menupreview=True)
-       job_manager.AddJob(j)
-       return j
-
-def BurnDataTS(session, project):
-       j = DVDdataJob(project)
-       job_manager.AddJob(j)
-       return j