aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/Extensions
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2008-11-17 23:34:50 +0100
committerghost <andreas.monzner@multimedia-labs.de>2008-11-17 23:34:50 +0100
commit307b1a3a29f51944baf8866292f6150f6aa8ca62 (patch)
treef9f1e03395c9893c6ecb808637573ca7a204bd0c /lib/python/Plugins/Extensions
parent5aa89f34249397330995cc0ab1e080c1f567e174 (diff)
parent9f233a55dbc640a9dd8d1aa46c1291d28fdea3b4 (diff)
downloadenigma2-307b1a3a29f51944baf8866292f6150f6aa8ca62.tar.gz
enigma2-307b1a3a29f51944baf8866292f6150f6aa8ca62.zip
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Plugins/Extensions')
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py2
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/Process.py9
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/TitleList.py22
-rw-r--r--lib/python/Plugins/Extensions/MediaPlayer/plugin.py27
4 files changed, 43 insertions, 17 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
index b88dbb3f..ce16259e 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
@@ -63,7 +63,7 @@ class DVDToolbox(Screen):
def pageDown(self):
self["details"].pageDown()
- def update(self, dev="", media_state=""):
+ def update(self, dev="", action=""):
self["space_label"].text = _("Please wait... Loading list...")
self["info"].text = ""
self["details"].setText("")
diff --git a/lib/python/Plugins/Extensions/DVDBurn/Process.py b/lib/python/Plugins/Extensions/DVDBurn/Process.py
index 89ca90fd..750e9d9b 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/Process.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/Process.py
@@ -165,7 +165,7 @@ class DemuxTask(Task):
def cleanup(self, failed):
if failed:
import os
- for file in self.generated_files.itervalues():
+ for file in self.generated_files:
os.remove(file)
class MplexTaskPostcondition(Condition):
@@ -220,7 +220,7 @@ class RemoveESFiles(Task):
def prepare(self):
self.args += ["-f"]
- self.args += self.demux_task.generated_files.values()
+ self.args += self.demux_task.generated_files
self.args += [self.demux_task.cutfile]
class DVDAuthorTask(Task):
@@ -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):
@@ -791,7 +794,7 @@ class DVDJob(Job):
demux = DemuxTask(self, link_name)
self.mplextask = MplexTask(self, outputfile=title_filename, demux_task=demux)
self.mplextask.end = self.estimateddvdsize
- #RemoveESFiles(self, demux)
+ RemoveESFiles(self, demux)
WaitForResidentTasks(self)
PreviewTask(self, self.workspace + "/dvd/VIDEO_TS/")
output = self.project.settings.output.getValue()
diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
index 345af877..537da0dd 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
@@ -74,9 +74,22 @@ class TitleList(Screen, HelpableScreen):
self["titles"] = List(list = [ ], enableWrapAround = True, item_height=30, fonts = [gFont("Regular", 20)])
self.updateTitleList()
-
+
+ def checkBackgroundJobs(self):
+ for job in job_manager.getPendingJobs():
+ print "type(job):", type(job)
+ print "Process.DVDJob:", Process.DVDJob
+ if type(job) == Process.DVDJob:
+ self.backgroundJob = job
+ return
+ self.backgroundJob = None
+
def showMenu(self):
menu = []
+ self.checkBackgroundJobs()
+ if self.backgroundJob:
+ j = self.backgroundJob
+ menu.append(("%s: %s (%d%%)" % (j.getStatustext(), j.name, int(100*j.progress/float(j.end))), self.showBackgroundJob))
if self.project.settings.output.getValue() == "dvd":
menu.append((_("Burn DVD"), self.burnProject))
elif self.project.settings.output.getValue() == "iso":
@@ -97,6 +110,11 @@ class TitleList(Screen, HelpableScreen):
if choice:
choice[1]()
+ def showBackgroundJob(self):
+ job_manager.in_background = False
+ self.session.openWithCallback(self.JobViewCB, JobView, self.backgroundJob)
+ self.backgroundJob = None
+
def titleProperties(self):
if self.getCurrentTitle():
self.session.openWithCallback(self.updateTitleList, TitleProperties.TitleProperties, self, self.project, self["titles"].getIndex())
@@ -217,7 +235,7 @@ class TitleList(Screen, HelpableScreen):
totalsize += title.estimatedDiskspace
self["titles"].list = res
self.updateSize(totalsize)
-
+
def updateSize(self, totalsize):
size = int((totalsize/1024)/1024)
max_SL = 4370
diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
index 0d5305d7..babef3e7 100644
--- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
@@ -863,17 +863,22 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
self.session.open(Subtitles)
def hotplugCB(self, dev, media_state):
- if dev == harddiskmanager.getCD():
- from Components.Scanner import scanDevice
- devpath = harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD())
- self.cdAudioTrackFiles = []
- res = scanDevice(devpath)
- list = [ (r.description, r, res[r], self.session) for r in res ]
- if list:
- (desc, scanner, files, session) = list[0]
- for file in files:
- if file.mimetype == "audio/x-cda":
- self.cdAudioTrackFiles.append(file.path)
+ if dev == harddiskmanager.getCD():
+ if media_state == "1":
+ from Components.Scanner import scanDevice
+ devpath = harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD())
+ self.cdAudioTrackFiles = []
+ res = scanDevice(devpath)
+ list = [ (r.description, r, res[r], self.session) for r in res ]
+ if list:
+ (desc, scanner, files, session) = list[0]
+ for file in files:
+ if file.mimetype == "audio/x-cda":
+ self.cdAudioTrackFiles.append(file.path)
+ else:
+ self.cdAudioTrackFiles = []
+ if self.isAudioCD:
+ self.clear_playlist()
class MediaPlayerLCDScreen(Screen):
skin = """