X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/eb047f3299d45a434c6537ab01dfb3656f686f11..0cfa2e76e477e6e0abf46c97640a2e38a2fc308d:/lib/python/Plugins/Extensions/DVDBurn/Process.py diff --git a/lib/python/Plugins/Extensions/DVDBurn/Process.py b/lib/python/Plugins/Extensions/DVDBurn/Process.py index 5a535e85..9ee5a3c6 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Process.py +++ b/lib/python/Plugins/Extensions/DVDBurn/Process.py @@ -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, "-P", "Dreambox", "-use-the-force-luke=dummy", self.job.workspace + "/dvd"] + self.args += [ "-dvd-compat", "-Z", "/dev/" + 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 @@ -335,6 +336,9 @@ class PreviewTask(Task): self.previewProject() else: self.job.project.session.openWithCallback(self.previewCB, MessageBox, _("Do you want to preview this DVD before burning?"), timeout = 60, default = False) + + def abort(self): + self.finish(aborted = True) def previewCB(self, answer): if answer == True: @@ -391,7 +395,7 @@ class ImagingPostcondition(Condition): return task.returncode == 0 def getErrorMessage(self, task): - return "python-imaging " + _("failed") + return _("Failed") + ": python-imaging" class ImagePrepareTask(Task): def __init__(self, job): @@ -662,7 +666,7 @@ class DVDJob(Job): DVDAuthorTask(self, diskSpaceNeeded) nr_titles = len(self.project.titles) - + if self.menupreview: PreviewTask(self) else: @@ -676,7 +680,7 @@ class DVDJob(Job): RemoveESFiles(self, demux) WaitForResidentTasks(self) PreviewTask(self) - BurnTask(self,["-dvd-video"]) + BurnTask(self, ["-dvd-video", self.workspace + "/dvd"]) RemoveDVDFolder(self) class DVDdataJob(Job): @@ -703,20 +707,5 @@ class DVDdataJob(Job): link_name = self.workspace + filename LinkTS(self, title.inputfile, link_name) CopyMeta(self, title.inputfile) - BurnTask(self) + 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