Merge branch 'master' into bug_236_recordpath
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 5 Nov 2009 07:30:02 +0000 (08:30 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 5 Nov 2009 07:30:02 +0000 (08:30 +0100)
data/setup.xml
lib/python/Components/NimManager.py
lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Screens/InfoBar.py
lib/python/Screens/InfoBarGenerics.py
lib/service/servicemp3.cpp

index fe91ba2..22705f0 100644 (file)
                        <item level="0" text="Brightness">config.lcd.bright</item>
                        <item level="0" text="Contrast">config.lcd.contrast</item>
                        <item level="0" text="Standby">config.lcd.standby</item>
-                       <item level="2" text="Invert display">config.lcd.invert</item>
                </setup>
                <setup key="satconfig" title="Sat / Dish Setup">
                        <item text="Tuner Slot">config.sat.tunerslot</item>
index 70cde47..5154e2b 100644 (file)
@@ -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")}
 
index feb39a9..53287a3 100755 (executable)
@@ -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")
index 596f2d5..0e3bdf0 100644 (file)
@@ -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()
index be1407d..a15c7ac 100644 (file)
@@ -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..."))]))
index b27df9d..ed41bb2 100644 (file)
@@ -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:
index 7f87ffa..e1bf23d 100644 (file)
@@ -42,7 +42,6 @@ eServiceFactoryMP3::eServiceFactoryMP3()
                extensions.push_back("mp4");
                extensions.push_back("mov");
                extensions.push_back("m4a");
-               extensions.push_back("m2ts");
                sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions);
        }