self.settings = ConfigSubsection()
choicelist = [(PAGE_AUDIO,_("audio tracks")), (PAGE_SUBTITLES,_("Subtitles"))]
- print "debug 1: choicelist", page
self.settings.menupage = ConfigSelection(choices = choicelist, default=page)
- self.settings.menupage.addNotifier(self.fillList)
- print "debug 2"
self.onLayoutFinish.append(self.__layoutFinished)
- print "debug 3"
def __layoutFinished(self):
- print "[__layoutFinished]"
self["config"].instance.setSelectionEnable(False)
- print "after instance.setSelectionEnable"
self.focus = FOCUS_STREAMS
- print "debug 4"
+ self.settings.menupage.addNotifier(self.fillList)
def fillList(self, arg=None):
- print "debug fillList"
streams = []
conflist = []
selectedidx = 0
-
- print "debug fillList 2"
-
+
if self.settings.menupage.getValue() == PAGE_AUDIO:
self.setTitle(_("Select audio track"))
service = self.session.nav.getCurrentService()
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)
self["key_green"].setBoolean(False)
elif self.settings.menupage.getValue() == PAGE_SUBTITLES:
- print "debug PAGE_SUBTITLES"
self.setTitle(_("Subtitle selection"))
conflist.append(('',))
conflist.append(('',))
idx = 0
subtitlelist = self.getSubtitleList()
- print ">>>>>>>>subtitlelist", subtitlelist
if len(subtitlelist):
for x in subtitlelist:
language = _("<unknown>")
selected = ""
- if sel and x[:4] == sel[:4]:
+ if sel and x == sel:
selected = _("Running")
selectedidx = idx
number = "%x%02x" % (x[3],x[2])
elif x[0] == 2:
- types = (_("<unknown>"), "UTF-8 text", "SSA", "AAS", ".SRT file", "VOB")
+ types = (_("<unknown>"), "UTF-8 text", "SSA", "AAS", ".SRT file", "VOB", "PGS (unsupported)")
description = types[x[2]]
streams.append((x, "", number, description, language, selected))
- print "appending", x, "", number, description, language, selected
idx += 1
else:
conflist.append(getConfigListEntry(Plugins[0][0], ConfigNothing()))
self.plugincallfunc = Plugins[0][1]
if len(Plugins) > 1:
- print "these plugins are installed but not displayed in the dialog box:", Plugins[1:]
+ print "plugin(s) installed but not displayed in the dialog box:", Plugins[1:]
self["config"].list = conflist
self["config"].l.setList(conflist)
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):
else:
self.enableSubtitle(cur[0])
self.__updatedInfo()
- #self.close()
+ self.close(0)
elif self.focus == FOCUS_CONFIG:
self.keyRight()