X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/fc55f4436ab4ba47a6f04504ef04648377aa056e..7c01e1138eaef94a506371c3eccf66329af39e9b:/lib/python/Screens/SubservicesQuickzap.py diff --git a/lib/python/Screens/SubservicesQuickzap.py b/lib/python/Screens/SubservicesQuickzap.py index c0988868..24af517d 100644 --- a/lib/python/Screens/SubservicesQuickzap.py +++ b/lib/python/Screens/SubservicesQuickzap.py @@ -4,14 +4,15 @@ from Components.Label import Label from Screens.ChoiceBox import ChoiceBox from Screens.MessageBox import MessageBox -from InfoBarGenerics import InfoBarShowHide, InfoBarMenu, InfoBarServiceName, InfoBarInstantRecord, InfoBarTimeshift, InfoBarSeek, InfoBarTimeshiftState, InfoBarExtensions, InfoBarSubtitleSupport, InfoBarAudioSelection +from InfoBarGenerics import InfoBarShowHide, InfoBarMenu, InfoBarInstantRecord, InfoBarTimeshift, InfoBarSeek, InfoBarTimeshiftState, InfoBarExtensions, InfoBarSubtitleSupport, InfoBarAudioSelection +from Components.ServiceEventTracker import InfoBarBase from enigma import eTimer -class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, 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 [InfoBarShowHide, InfoBarMenu, InfoBarServiceName, 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() @@ -23,7 +24,7 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info self.currentlyPlayingSubservice = 0 self.timer = eTimer() - self.timer.timeout.get().append(self.playSubservice) + self.timer.callback.append(self.playSubservice) self.onLayoutFinish.append(self.onLayoutFinished) self["actions"] = NumberActionMap( [ "InfobarSubserviceQuickzapActions", "NumberActions", "DirectionActions", "ColorActions" ], @@ -45,6 +46,11 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info "9": self.keyNumberGlobal, "0": self.keyNumberGlobal }, 0) + + self.onClose.append(self.__onClose) + + def __onClose(self): + self.session.nav.playService(self.restoreService, False) def onLayoutFinished(self): self.timer.start(0,True) @@ -112,7 +118,6 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info def quit(self, answer): if answer: - self.session.nav.playService(self.restoreService) self.close() def playSubservice(self, number = 0): @@ -121,7 +126,7 @@ class SubservicesQuickzap(InfoBarShowHide, InfoBarMenu, InfoBarServiceName, Info del self.subservices del self.service self.lastservice = self.currentlyPlayingSubservice - self.session.nav.playService(newservice) + self.session.nav.playService(newservice, False) self.currentlyPlayingSubservice = number self.currentSubserviceNumberLabel.setText(str(number)) self.doShow()