X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FAudioSelection.py;h=b3b82b46d0fed8d6477bff4f304649bfaf305ec4;hb=dec9693d8437a31dab8e4010b33b57e1476a315c;hp=a0bfcab9490c720382aa84fc744efe0dbc82ead2;hpb=a8d75296d6619328f08748e987ce39e1028b0e15;p=vuplus_dvbapp diff --git a/lib/python/Screens/AudioSelection.py b/lib/python/Screens/AudioSelection.py index a0bfcab..b3b82b4 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(('',)) + self["key_green"].setBoolean(False) selectedAudio = self.audioTracks.getCurrentTrack() for x in range(n): number = str(x) @@ -137,7 +141,7 @@ class AudioSelection(Screen, ConfigListScreen): language = _("") selected = "" - if sel and x[:4] == sel[:4]: + if sel and x == sel: selected = _("Running") selectedidx = idx @@ -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):