aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2009-07-29 14:08:29 +0200
committerFraxinas <andreas.frisch@multimedia-labs.de>2009-07-29 14:08:29 +0200
commited817937df0a68c0b222a4e48fdf24984d87c2fb (patch)
treeddb26c4371a8e8e5e0bc6d205044a2180a575d62 /lib/python/Plugins
parentea3d049f9be807828c8b4450ed3e83552abbac9e (diff)
downloadenigma2-ed817937df0a68c0b222a4e48fdf24984d87c2fb.tar.gz
enigma2-ed817937df0a68c0b222a4e48fdf24984d87c2fb.zip
fix disc size unit confusion
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/DVDProject.py4
-rw-r--r--lib/python/Plugins/Extensions/DVDBurn/TitleList.py21
2 files changed, 14 insertions, 11 deletions
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
index 9a3bd64c..83672460 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
@@ -18,8 +18,8 @@ class ConfigFilename(ConfigText):
return ("mtext"[1-selected:], filename, mark)
class DVDProject:
- MAX_SL = 4370
- MAX_DL = 7950
+ MAX_SL = 4480
+ MAX_DL = 8150
def __init__(self):
self.titles = [ ]
self.target = None
diff --git a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
index aeb163f3..83bafd74 100644
--- a/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/TitleList.py
@@ -245,21 +245,24 @@ class TitleList(Screen, HelpableScreen):
self["key_yellow"].text = ""
def updateSize(self):
- size = self.project.size
- if size > self.project.MAX_DL:
- percent = 100 * size / float(self.project.MAX_DL)
+ size = self.project.size/(1024*1024)
+ MAX_DL = self.project.MAX_DL-100
+ MAX_SL = self.project.MAX_SL-100
+ print "updateSize:", size, "MAX_DL:", MAX_DL, "MAX_SL:", MAX_SL
+ if size > MAX_DL:
+ percent = 100 * size / float(MAX_DL)
self["space_label"].text = "%d MB - " % size + _("exceeds dual layer medium!") + " (%.2f%% " % (100-percent) + _("free") + ")"
self["space_bar"].value = int(percent)
- if self.previous_size < self.project.MAX_DL:
+ if self.previous_size < MAX_DL:
self.session.open(MessageBox,text = _("exceeds dual layer medium!"), type = MessageBox.TYPE_ERROR)
- elif size > self.project.MAX_SL:
- percent = 100 * size / float(self.project.MAX_DL)
+ elif size > MAX_SL:
+ percent = 100 * size / float(MAX_DL)
self["space_label"].text = "%d MB " % size + _("of a DUAL layer medium used.") + " (%.2f%% " % (100-percent) + _("free") + ")"
self["space_bar"].value = int(percent)
- if self.previous_size < self.project.MAX_SL:
+ if self.previous_size < MAX_SL:
self.session.open(MessageBox,text = _("Your collection exceeds the size of a single layer medium, you will need a blank dual layer DVD!"), type = MessageBox.TYPE_INFO)
- elif size < self.project.MAX_SL:
- percent = 100 * size / float(self.project.MAX_SL)
+ elif size < MAX_SL:
+ percent = 100 * size / float(MAX_SL)
self["space_label"].text = "%d MB " % size + _("of a SINGLE layer medium used.") + " (%.2f%% " % (100-percent) + _("free") + ")"
self["space_bar"].value = int(percent)
self.previous_size = size