Merge branch 'bug_236_recordpath' into experimental
authorghost <andreas.monzner@multimedia-labs.de>
Tue, 3 Nov 2009 18:40:57 +0000 (19:40 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Tue, 3 Nov 2009 18:40:57 +0000 (19:40 +0100)
data/setup.xml
lib/python/Components/AVSwitch.py
lib/python/Components/NimManager.py
lib/python/Components/config.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Screens/InfoBar.py
lib/python/Screens/InfoBarGenerics.py
lib/service/servicemp3.cpp

index fe91ba25ab6e688dc4f655b0f107542e2fe87a54..9425afda93b0dfe1948a7f638bc6dd40058c1ea0 100644 (file)
@@ -13,8 +13,8 @@
                        <item level="0" text="TV System">config.av.tvsystem</item>
                        <item level="1" text="WSS on 4:3">config.av.wss</item>
                        <item level="1" text="AC3 default">config.av.defaultac3</item>
-                       <item level="1" text="General AC3 delay">config.av.generalAC3delay</item>
-                       <item level="1" text="General PCM delay">config.av.generalPCMdelay</item>
+                       <item level="1" text="General AC3 delay (ms)">config.av.generalAC3delay</item>
+                       <item level="1" text="General PCM delay (ms)">config.av.generalPCMdelay</item>
                        <item level="1" text="AC3 downmix" requires="CanDownmixAC3">config.av.downmix_ac3</item>
                        <item level="1" text="Auto scart switching" requires="ScartSwitch">config.av.vcrswitch</item>
                </setup>
                        <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 bc2a66a4947f2384999f93d10a4b8567d22b1ab4..2658f9ba532c4c593de84bc060de371aa79daecb 100644 (file)
@@ -1,5 +1,5 @@
 from config import config, ConfigSlider, ConfigSelection, ConfigYesNo, \
-       ConfigEnableDisable, ConfigSubsection, ConfigBoolean, ConfigNumber, ConfigNothing, NoSave
+       ConfigEnableDisable, ConfigSubsection, ConfigBoolean, ConfigSelectionNumber, ConfigNothing, NoSave
 from enigma import eAVSwitch, getDesktop
 from SystemInfo import SystemInfo
 from os import path as os_path
@@ -112,8 +112,8 @@ def InitAVSwitch():
        config.av.tvsystem = ConfigSelection(choices = {"pal": _("PAL"), "ntsc": _("NTSC"), "multinorm": _("multinorm")}, default="pal")
        config.av.wss = ConfigEnableDisable(default = True)
        config.av.defaultac3 = ConfigYesNo(default = False)
-       config.av.generalAC3delay = ConfigNumber(default = 0)
-       config.av.generalPCMdelay = ConfigNumber(default = 0)
+       config.av.generalAC3delay = ConfigSelectionNumber(-1000, 1000, 25, default = 0)
+       config.av.generalPCMdelay = ConfigSelectionNumber(-1000, 1000, 25, default = 0)
        config.av.vcrswitch = ConfigEnableDisable(default = False)
 
        iAVSwitch = AVSwitch()
index 70cde47ca3ede1b0a08427268e7d6f6630a913fb..5154e2b05654ace4ad423c51da067fe5908434a0 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 450c302e6bb0e1be39433ac6d7b6e14d7540a356..876e3a34a7b56683960a98981088ef409eb1bf35 100755 (executable)
@@ -1017,6 +1017,42 @@ class ConfigPassword(ConfigText):
                ConfigText.onDeselect(self, session)
                self.hidden = True
 
+# lets the user select between [min, min+stepwidth, min+(stepwidth*2)..., maxval] with maxval <= max depending
+# on the stepwidth
+# min, max, stepwidth, default are int values
+# wraparound: pressing RIGHT key at max value brings you to min value and vice versa if set to True
+class ConfigSelectionNumber(ConfigSelection):
+       def __init__(self, min, max, stepwidth, default = None, wraparound = False):
+               self.wraparound = wraparound
+               if default is None:
+                       default = min
+               default = str(default)
+               choices = []
+               step = min
+               while step <= max:
+                       choices.append(str(step))
+                       step += stepwidth
+               
+               ConfigSelection.__init__(self, choices, default)
+               
+       def getValue(self):
+               return int(self.text)
+
+       def setValue(self, val):
+               self.text = str(val)
+               
+       def handleKey(self, key):
+               if not self.wraparound:
+                       if key == KEY_RIGHT:
+                               if len(self.choices) == (self.choices.index(self.value) + 1):
+                                       return
+                       if key == KEY_LEFT:
+                               if self.choices.index(self.value) == 0:
+                                       return
+               ConfigSelection.handleKey(self, key)
+                               
+                               
+
 class ConfigNumber(ConfigText):
        def __init__(self, default = 0):
                ConfigText.__init__(self, str(default), fixed_size = False)
index 596f2d5abd8e9dd7e45d30ff0e5bb583ad086043..0e3bdf02b93f6b75800f24588c6a6ad6a0cca38d 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 be1407d39a69b44ca589e4d55f9af1a2b859d405..a15c7ac1b89b5597b0b314d6cf6f5fc55935d5e7 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 b27df9d319cc80792b433b3262188bb3455b982b..ed41bb289b954151ace7b874015cce0e781879dc 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
 
@@ -1357,17 +1356,6 @@ class InfoBarJobman:
        def JobViewCB(self, in_background):
                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):
index 7f87ffad734ffd93250a8cf89a9ee25342e25904..e1bf23dd8482f83106783cdfa014b83b649d77f4 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);
        }