git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove comments from Makefile.am to make automatic parsing easier
[enigma2.git]
/
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 0c375129d71d57d0b46b9f40131f6e3ff529e03d..ce16259ea568c5583a48446ff085714d19f2bc93 100644
(file)
--- 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 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 = """
class DVDToolbox(Screen):
skin = """
@@
-49,11
+50,12
@@
class DVDToolbox(Screen):
"green": self.update,
"yellow": self.format,
#"blue": self.eject,
"green": self.update,
"yellow": self.format,
#"blue": self.eject,
- "cancel": self.
close
,
+ "cancel": self.
exit
,
"pageUp": self.pageUp,
"pageDown": self.pageDown
})
self.update()
"pageUp": self.pageUp,
"pageDown": self.pageDown
})
self.update()
+ hotplugNotifier.append(self.update)
def pageUp(self):
self["details"].pageUp()
def pageUp(self):
self["details"].pageUp()
@@
-61,7
+63,7
@@
class DVDToolbox(Screen):
def pageDown(self):
self["details"].pageDown()
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("")
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:]
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
self.formattable = True
else:
self.formattable = False
@@
-141,6
+143,7
@@
class DVDToolbox(Screen):
def exit(self):
del self.Console
def exit(self):
del self.Console
+ hotplugNotifier.remove(self.update)
self.close()
class DVDformatJob(Job):
self.close()
class DVDformatJob(Job):
@@
-150,7
+153,7
@@
class DVDformatJob(Job):
DVDformatTask(self)
def retry(self):
DVDformatTask(self)
def retry(self):
- self.tasks[0].args +=
[ "-force" ]
+ self.tasks[0].args +=
self.tasks[0].retryargs
Job.retry(self)
class DVDformatTaskPostcondition(Condition):
Job.retry(self)
class DVDformatTaskPostcondition(Condition):
@@
-174,6
+177,7
@@
class DVDformatTask(Task):
self.setTool("/bin/dvd+rw-format")
self.args += [ "/dev/" + harddiskmanager.getCD() ]
self.end = 1100
self.setTool("/bin/dvd+rw-format")
self.args += [ "/dev/" + harddiskmanager.getCD() ]
self.end = 1100
+ self.retryargs = [ ]
def prepare(self):
self.error = None
def prepare(self):
self.error = None
@@
-181,7
+185,10
@@
class DVDformatTask(Task):
def processOutputLine(self, line):
if line.startswith("- media is already formatted"):
self.error = self.ERROR_ALREADYFORMATTED
def processOutputLine(self, line):
if line.startswith("- media is already formatted"):
self.error = self.ERROR_ALREADYFORMATTED
- self.force = True
+ self.retryargs = [ "-force" ]
+ 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"):
self.error = self.ERROR_NOTWRITEABLE
if line.startswith(":-( mounted media doesn't appear to be"):
self.error = self.ERROR_NOTWRITEABLE