aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2011-01-27 17:01:31 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2011-01-27 17:01:31 +0100
commit3698155ca276e4ea2a39ac00a29cc6cb241c28e6 (patch)
treee07121df887bd2661f269bae3ce3f8b5aa4ab801 /lib/python
parentce38faaf7ce4c1320fa42109c13a60d74ab8cd9c (diff)
downloadenigma2-3698155ca276e4ea2a39ac00a29cc6cb241c28e6.tar.gz
enigma2-3698155ca276e4ea2a39ac00a29cc6cb241c28e6.zip
allow AudioSelection screens for services without ChannelSelection interface (needed for #440 DVD player AudioSelection)
Diffstat (limited to 'lib/python')
-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 a0bfcab9..576fd381 100644
--- a/lib/python/Screens/AudioSelection.py
+++ b/lib/python/Screens/AudioSelection.py
@@ -77,11 +77,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(getConfigListEntry("", ConfigNothing()))
+ self["key_green"].setBoolean(False)
selectedAudio = self.audioTracks.getCurrentTrack()
for x in range(n):
number = str(x)
@@ -156,7 +160,7 @@ class AudioSelection(Screen, ConfigListScreen):
number = "%x%02x" % (x[3],x[2])
elif x[0] == 2:
- types = ("UTF-8 text","SSA / AAS",".SRT file")
+ types = ("UTF-8 text","SSA / AAS",".SRT file","VOB")
description = types[x[2]]
streams.append((x, "", number, description, language, selected))
@@ -219,7 +223,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):