aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/AudioSelection.py
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2011-01-28 11:42:26 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2011-01-28 11:46:53 +0100
commitc0a60ca49ae1b2384c9bfbeccb1a15e97133d1b2 (patch)
treee5502aa00319c1895209eef07f03ef7a212c4a10 /lib/python/Screens/AudioSelection.py
parentf32b288b3236e41686e67eda2bccf2f083223bca (diff)
parentf3060d26bbb98713b901794b6e47bf7f064a9073 (diff)
downloadenigma2-c0a60ca49ae1b2384c9bfbeccb1a15e97133d1b2.tar.gz
enigma2-c0a60ca49ae1b2384c9bfbeccb1a15e97133d1b2.zip
Merge branch 'bug_440_dvdplayer_audioselection' into experimental [fixes ##440+441, requires libdreamdvd >=0.10 20110128]experimental-2011.02
Conflicts: lib/python/Screens/AudioSelection.py
Diffstat (limited to 'lib/python/Screens/AudioSelection.py')
-rw-r--r--lib/python/Screens/AudioSelection.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py
index 068da870..4c689620 100644
--- a/lib/python/Screens/AudioSelection.py
+++ b/lib/python/Screens/AudioSelection.py
@@ -76,11 +76,15 @@ class AudioSelection(Screen, ConfigListScreen):
if n > 0:
self.audioChannel = service.audioChannel()
- choicelist = [("0",_("left")), ("1",_("stereo")), ("2", _("right"))]
- self.settings.channelmode = ConfigSelection(choices = choicelist, default = str(self.audioChannel.getCurrentChannel()))
- self.settings.channelmode.addNotifier(self.changeMode, initial_call = False)
- conflist.append(getConfigListEntry(_("Channel"), self.settings.channelmode))
- self["key_green"].setBoolean(True)
+ if self.audioChannel:
+ choicelist = [("0",_("left")), ("1",_("stereo")), ("2", _("right"))]
+ self.settings.channelmode = ConfigSelection(choices = choicelist, default = str(self.audioChannel.getCurrentChannel()))
+ self.settings.channelmode.addNotifier(self.changeMode, initial_call = False)
+ conflist.append(getConfigListEntry(_("Channel"), self.settings.channelmode))
+ self["key_green"].setBoolean(True)
+ else:
+ conflist.append(('',))
+ self["key_green"].setBoolean(False)
selectedAudio = self.audioTracks.getCurrentTrack()
for x in range(n):
number = str(x)
@@ -136,7 +140,7 @@ class AudioSelection(Screen, ConfigListScreen):
language = _("<unknown>")
selected = ""
- if sel and x[:4] == sel[:4]:
+ if sel and x == sel:
selected = _("Running")
selectedidx = idx
@@ -218,7 +222,7 @@ class AudioSelection(Screen, ConfigListScreen):
config.av.downmix_ac3.save()
def changeMode(self, mode):
- if mode is not None:
+ if mode is not None and self.audioChannel:
self.audioChannel.selectChannel(int(mode.getValue()))
def changeAudio(self, audio):