diff options
| author | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-13 18:29:57 +0000 |
|---|---|---|
| committer | Andreas Frisch <andreas.frisch@multimedia-labs.de> | 2008-10-13 18:29:57 +0000 |
| commit | e713bd3d222127573350eddb3f71941fda771054 (patch) | |
| tree | 8ee0785da50ba83a2f937d1d4bc610ab17a44853 /lib/python/Plugins/Extensions | |
| parent | cac4af3cc304626c6c600d0dfb7fce8fe7b5f7b1 (diff) | |
| download | enigma2-e713bd3d222127573350eddb3f71941fda771054.tar.gz enigma2-e713bd3d222127573350eddb3f71941fda771054.zip | |
allow DVD burning in background. to view progress of jobs, press extensions key (blue) in TV mode
Diffstat (limited to 'lib/python/Plugins/Extensions')
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/Process.py | 19 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDBurn/TitleList.py | 30 |
2 files changed, 20 insertions, 29 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/Process.py b/lib/python/Plugins/Extensions/DVDBurn/Process.py index 71f7c998..c89f79c9 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Process.py +++ b/lib/python/Plugins/Extensions/DVDBurn/Process.py @@ -1,4 +1,4 @@ -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 @@ -663,7 +663,7 @@ class DVDJob(Job): DVDAuthorTask(self, diskSpaceNeeded) nr_titles = len(self.project.titles) - + if self.menupreview: PreviewTask(self) else: @@ -706,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 diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py index 3a732115..1842a5d7 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py +++ b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py @@ -1,9 +1,11 @@ -import DVDProject, TitleList, TitleCutter, ProjectSettings, DVDToolbox +import DVDProject, TitleList, TitleCutter, ProjectSettings, DVDToolbox, Process from Screens.Screen import Screen from Screens.ChoiceBox import ChoiceBox from Screens.InputBox import InputBox from Screens.MessageBox import MessageBox from Screens.HelpMenu import HelpableScreen +from Screens.TaskView import JobView +from Components.Task import job_manager from Components.ActionMap import HelpableActionMap, ActionMap from Components.Sources.List import List from Components.Sources.StaticText import StaticText @@ -185,24 +187,28 @@ class TitleList(Screen, HelpableScreen): def burnProject(self): if self.project.settings.authormode.getValue() == "data_ts": - import Process - job = Process.BurnDataTS(self.session, self.project) - from Screens.TaskView import JobView - self.session.open(JobView, job) + job = Process.DVDdataJob(self.project) + job_manager.AddJob(job) + job_manager.in_background = False + self.session.openWithCallback(self.JobViewCB, JobView, job) else: autochapter = self.project.settings.autochapter.getValue() if autochapter > 0: for title in self.project.titles: title.produceAutoChapter(autochapter) - import Process - job = Process.Burn(self.session, self.project) - from Screens.TaskView import JobView - self.session.open(JobView, job) + job = Process.DVDJob(self.project) + job_manager.AddJob(job) + job_manager.in_background = False + self.session.openWithCallback(self.JobViewCB, JobView, job) - def previewMenu(self): - import Process - job = Process.PreviewMenu(self.session, self.project) + def JobViewCB(self, in_background): + job_manager.in_background = in_background + def previewMenu(self): + job = Process.DVDJob(self.project, menupreview=True) + job_manager.in_background = False + job_manager.AddJob(job) + def updateTitleList(self): res = [ ] totalsize = 0 |
