aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-11-05 08:30:02 +0100
committerghost <andreas.monzner@multimedia-labs.de>2009-11-05 08:30:02 +0100
commita8fd8e5e6c8a56c2e8dcdfbf7927b7e31221fd9a (patch)
tree74b93ccdc96f04b4d272d69f084fe3080731f152 /lib/python
parent7560beb3e371704d798259ca1ea927bf4575306c (diff)
parent946a71097573dc8abc273d24efd23bab3e5f2fb2 (diff)
downloadenigma2-a8fd8e5e6c8a56c2e8dcdfbf7927b7e31221fd9a.tar.gz
enigma2-a8fd8e5e6c8a56c2e8dcdfbf7927b7e31221fd9a.zip
Merge branch 'master' into bug_236_recordpath
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/NimManager.py2
-rwxr-xr-xlib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py42
-rw-r--r--lib/python/Plugins/Extensions/MediaPlayer/plugin.py2
-rw-r--r--lib/python/Screens/InfoBar.py6
-rw-r--r--lib/python/Screens/InfoBarGenerics.py12
5 files changed, 32 insertions, 32 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py
index 70cde47c..5154e2b0 100644
--- a/lib/python/Components/NimManager.py
+++ b/lib/python/Components/NimManager.py
@@ -939,7 +939,7 @@ def InitNimManager(nimmgr):
lnb_choices = {
"universal_lnb": _("Universal LNB"),
- "unicable": _("Unicable"),
+# "unicable": _("Unicable"),
"c_band": _("C-Band"),
"user_defined": _("User defined")}
diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
index feb39a95..53287a36 100755
--- a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
@@ -82,7 +82,9 @@ class DVDToolbox(Screen):
self.update()
def mediainfoCB(self, mediuminfo, retval, extra_args):
- capacity = 1
+ formatted_capacity = 0
+ read_capacity = 0
+ capacity = 0
used = 0
infotext = ""
mediatype = ""
@@ -93,21 +95,17 @@ class DVDToolbox(Screen):
self.formattable = True
else:
self.formattable = False
- if line.find("Legacy lead-out at:") > -1:
+ elif line.find("Legacy lead-out at:") > -1:
used = int(line.rsplit('=',1)[1]) / 1048576.0
- print "[lead out] used =", used
+ print "[dvd+rw-mediainfo] lead out used =", used
elif line.find("formatted:") > -1:
- capacity = int(line.rsplit('=',1)[1]) / 1048576.0
- print "[formatted] capacity =", capacity
- elif capacity == 1 and line.find("READ CAPACITY:") > -1:
- capacity = int(line.rsplit('=',1)[1]) / 1048576.0
- print "[READ CAP] capacity =", capacity
- elif line.find("Disc status:") > -1:
- if line.find("blank") > -1:
- print "[Disc status] capacity=%d, used=0" % (capacity)
- capacity = used
- used = 0
- elif line.find("Free Blocks:") > -1:
+ formatted_capacity = int(line.rsplit('=',1)[1]) / 1048576.0
+ print "[dvd+rw-mediainfo] formatted capacity =", formatted_capacity
+ elif formatted_capacity == 0 and line.find("READ CAPACITY:") > -1:
+ read_capacity = int(line.rsplit('=',1)[1]) / 1048576.0
+ print "[dvd+rw-mediainfo] READ CAPACITY =", read_capacity
+ for line in mediuminfo.splitlines():
+ if line.find("Free Blocks:") > -1:
try:
size = eval(line[14:].replace("KB","*1024"))
except:
@@ -116,8 +114,22 @@ class DVDToolbox(Screen):
capacity = size / 1048576
if used:
used = capacity-used
- print "[free blocks] capacity=%d, used=%d" % (capacity, used)
+ print "[dvd+rw-mediainfo] free blocks capacity=%d, used=%d" % (capacity, used)
+ elif line.find("Disc status:") > -1:
+ if line.find("blank") > -1:
+ print "[dvd+rw-mediainfo] Disc status blank capacity=%d, used=0" % (capacity)
+ capacity = used
+ used = 0
+ elif line.find("complete") > -1 and formatted_capacity == 0:
+ print "[dvd+rw-mediainfo] Disc status complete capacity=0, used=%d" % (capacity)
+ used = read_capacity
+ capacity = 1
+ else:
+ capacity = formatted_capacity
infotext += line+'\n'
+ if capacity and used > capacity:
+ used = read_capacity or capacity
+ capacity = formatted_capacity or capacity
self["details"].setText(infotext)
if self.formattable:
self["key_yellow"].text = _("Format")
diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
index 596f2d5a..0e3bdf02 100644
--- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
+++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py
@@ -110,7 +110,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
# 'None' is magic to start at the list of mountpoints
defaultDir = config.mediaplayer.defaultDir.getValue()
- self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|m2ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls")
+ self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls")
self["filelist"] = self.filelist
self.playlist = MyPlayList()
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py
index be1407d3..a15c7ac1 100644
--- a/lib/python/Screens/InfoBar.py
+++ b/lib/python/Screens/InfoBar.py
@@ -16,7 +16,7 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \
InfoBarSubserviceSelection, InfoBarShowMovies, InfoBarTimeshift, \
InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \
InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \
- InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport, InfoBarJobman
+ InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarServiceErrorPopupSupport, InfoBarJobman
profile("LOAD:InitBar_Components")
from Components.ActionMap import HelpableActionMap
@@ -32,7 +32,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish,
InfoBarSubserviceSelection, InfoBarTimeshift, InfoBarSeek,
InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions,
- InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport, InfoBarJobman,
+ InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarServiceErrorPopupSupport, InfoBarJobman,
Screen):
ALLOW_SUSPEND = True
@@ -56,7 +56,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \
InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \
InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, \
- InfoBarSleepTimer, InfoBarPlugins, InfoBarServiceErrorPopupSupport:
+ InfoBarPlugins, InfoBarServiceErrorPopupSupport:
x.__init__(self)
self.helpList.append((self["actions"], "InfobarActions", [("showMovies", _("view recordings..."))]))
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index b27df9d3..ed41bb28 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -25,7 +25,6 @@ from Screens.TimerSelection import TimerSelection
from Screens.PictureInPicture import PictureInPicture
from Screens.SubtitleDisplay import SubtitleDisplay
from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive
-from Screens.SleepTimerEdit import SleepTimerEdit
from Screens.TimeDateInput import TimeDateInput
from ServiceReference import ServiceReference
@@ -1358,17 +1357,6 @@ class InfoBarJobman:
job_manager.in_background = in_background
# depends on InfoBarExtensions
-class InfoBarSleepTimer:
- def __init__(self):
- self.addExtension((self.getSleepTimerName, self.showSleepTimerSetup, lambda: True), "1")
-
- def getSleepTimerName(self):
- return _("Sleep Timer")
-
- def showSleepTimerSetup(self):
- self.session.open(SleepTimerEdit)
-
-# depends on InfoBarExtensions
class InfoBarPiP:
def __init__(self):
try: