X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/70e2fc28acaa3fb20a095acac7079377f8e1eb51..307b1a3a29f51944baf8866292f6150f6aa8ca62:/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py index d4e6a375..ce16259e 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py @@ -9,6 +9,7 @@ from Components.Task import Task, Job, job_manager, Condition from Components.ScrollLabel import ScrollLabel from Components.Harddisk import harddiskmanager from Components.Console import Console +from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier class DVDToolbox(Screen): skin = """ @@ -49,11 +50,12 @@ class DVDToolbox(Screen): "green": self.update, "yellow": self.format, #"blue": self.eject, - "cancel": self.close, + "cancel": self.exit, "pageUp": self.pageUp, "pageDown": self.pageDown }) self.update() + hotplugNotifier.append(self.update) def pageUp(self): self["details"].pageUp() @@ -61,7 +63,7 @@ class DVDToolbox(Screen): def pageDown(self): self["details"].pageDown() - def update(self): + def update(self, dev="", action=""): self["space_label"].text = _("Please wait... Loading list...") self["info"].text = "" self["details"].setText("") @@ -87,7 +89,7 @@ class DVDToolbox(Screen): for line in mediuminfo.splitlines(): if line.find("Mounted Media:") > -1: mediatype = line.rsplit(',',1)[1][1:] - if mediatype.find("RW") > 0: + if mediatype.find("RW") > 0 or mediatype.find("RAM") > 0: self.formattable = True else: self.formattable = False @@ -141,6 +143,7 @@ class DVDToolbox(Screen): def exit(self): del self.Console + hotplugNotifier.remove(self.update) self.close() class DVDformatJob(Job): @@ -183,7 +186,7 @@ class DVDformatTask(Task): if line.startswith("- media is already formatted"): self.error = self.ERROR_ALREADYFORMATTED self.retryargs = [ "-force" ] - if line.startswith("- media is not blank"): + if line.startswith("- media is not blank") or line.startswith(" -format=full to perform full (lengthy) reformat;"): self.error = self.ERROR_ALREADYFORMATTED self.retryargs = [ "-blank" ] if line.startswith(":-( mounted media doesn't appear to be"):