aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Task.py
diff options
context:
space:
mode:
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-13 18:29:57 +0000
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-13 18:29:57 +0000
commite713bd3d222127573350eddb3f71941fda771054 (patch)
tree8ee0785da50ba83a2f937d1d4bc610ab17a44853 /lib/python/Components/Task.py
parentcac4af3cc304626c6c600d0dfb7fce8fe7b5f7b1 (diff)
downloadenigma2-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/Components/Task.py')
-rw-r--r--lib/python/Components/Task.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/python/Components/Task.py b/lib/python/Components/Task.py
index a87f58d9..9a9d9fb7 100644
--- a/lib/python/Components/Task.py
+++ b/lib/python/Components/Task.py
@@ -244,6 +244,7 @@ class JobManager:
self.active_jobs = [ ]
self.failed_jobs = [ ]
self.job_classes = [ ]
+ self.in_background = False
self.active_job = None
def AddJob(self, job):
@@ -258,8 +259,11 @@ class JobManager:
def jobDone(self, job, task, problems):
print "job", job, "completed with", problems, "in", task
+ from Tools import Notifications
+ if self.in_background:
+ from Screens.TaskView import JobView
+ Notifications.AddNotification(JobView, self.active_job)
if problems:
- from Tools import Notifications
from Screens.MessageBox import MessageBox
if problems[0].RECOVERABLE:
Notifications.AddNotificationWithCallback(self.errorCB, MessageBox, _("Error: %s\nRetry?") % (problems[0].getErrorMessage(task)))
@@ -282,6 +286,12 @@ class JobManager:
self.active_job = None
self.kick()
+ def getPendingJobs(self):
+ list = [ ]
+ if self.active_job:
+ list.append(self.active_job)
+ list += self.active_jobs
+ return list
# some examples:
#class PartitionExistsPostcondition:
# def __init__(self, device):