X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FSubservicesQuickzap.py;h=3bcc3c4641d571f6370141f84db2cdc623b3de16;hp=24af517dbc4fd072ea9d02b0ef7f6c23e9bed2f5;hb=5219d43296787b3592eedba7fd78b54e87638351;hpb=7f088b2e0ec5051c3b9b9a1942198f0be28f315b diff --git a/lib/python/Screens/SubservicesQuickzap.py b/lib/python/Screens/SubservicesQuickzap.py index 24af517..3bcc3c4 100644 --- a/lib/python/Screens/SubservicesQuickzap.py +++ b/lib/python/Screens/SubservicesQuickzap.py @@ -9,10 +9,17 @@ from Components.ServiceEventTracker import InfoBarBase from enigma import eTimer -class SubservicesQuickzap(InfoBarBase, InfoBarShowHide, InfoBarMenu, InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, InfoBarTimeshiftState, InfoBarExtensions, InfoBarSubtitleSupport, InfoBarAudioSelection, Screen): +class SubservicesQuickzap(InfoBarBase, InfoBarShowHide, InfoBarMenu, \ + InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, \ + InfoBarTimeshiftState, InfoBarExtensions, InfoBarSubtitleSupport, \ + InfoBarAudioSelection, Screen): + def __init__(self, session, subservices): Screen.__init__(self, session) - for x in [InfoBarBase, InfoBarShowHide, InfoBarMenu, InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, InfoBarTimeshiftState, InfoBarSubtitleSupport, InfoBarExtensions, InfoBarAudioSelection]: + for x in InfoBarBase, InfoBarShowHide, InfoBarMenu, \ + InfoBarInstantRecord, InfoBarSeek, InfoBarTimeshift, \ + InfoBarTimeshiftState, InfoBarSubtitleSupport, \ + InfoBarExtensions, InfoBarAudioSelection: x.__init__(self) self.restoreService = self.session.nav.getCurrentlyPlayingServiceReference() @@ -97,12 +104,15 @@ class SubservicesQuickzap(InfoBarBase, InfoBarShowHide, InfoBarMenu, InfoBarInst def showSelection(self): self.updateSubservices() tlist = [] - if self.n is not None: - for x in range(self.n): - i = self.subservices.getSubservice(x) - tlist.append((i.getName(), x)) + n = self.n or 0 + if n: + idx = 0 + while idx < n: + i = self.subservices.getSubservice(idx) + tlist.append((i.getName(), idx)) + idx += 1 - keys = [ "", "1", "2", "3", "4", "5", "6", "7", "8", "9" ] + [""] * self.n + keys = [ "", "1", "2", "3", "4", "5", "6", "7", "8", "9" ] + [""] * n self.session.openWithCallback(self.subserviceSelected, ChoiceBox, title=_("Please select a subservice..."), list = tlist, selection = self.currentlyPlayingSubservice, keys = keys) def subserviceSelected(self, service):