def __init__(self, session, service, slist = None, lastservice = None): Screen.__init__(self, session) self["key_yellow"] = Label() self["key_blue"] = Label() self["key_green"] = Label() self["state"] = Label(text="") self["speed"] = Label(text="") self["statusicon"] = MultiPixmap() self["actions"] = HelpableActionMap(self, "MoviePlayerActions", { "leavePlayer": (self.leavePlayer, _("leave movie player...")), "leavePlayerOnExit": (self.leavePlayerOnExit, _("leave movie player...")) }) self.allowPiP = True for x in HelpableScreen, InfoBarShowHide, InfoBarMenu, InfoBarEPG, \ InfoBarBase, InfoBarSeek, InfoBarShowMovies, \ InfoBarAudioSelection, InfoBarNotifications, InfoBarSimpleEventView, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, \ InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, \ InfoBarTeletextPlugin, InfoBarServiceErrorPopupSupport, InfoBarExtensions, \ InfoBarPlugins, InfoBarPiP, InfoBarZoom: x.__init__(self) self.onChangedEntry = [ ] self.servicelist = slist self.lastservice = lastservice or session.nav.getCurrentlyPlayingServiceReference() session.nav.playService(service) from Screens.MovieSelection import Playlist self.playlist = Playlist.getPlayList() self.cur_service = service self.returning = False self.onClose.append(self.__onClose) self.onShow.append(self.doButtonsCheck) assert MoviePlayer.instance is None, "class InfoBar is a singleton class and just one instance of this class is allowed!" MoviePlayer.instance = self
def __onClose(self): MoviePlayer.instance = None from Screens.MovieSelection import Playlist Playlist.clearPlayList() self.session.nav.playService(self.lastservice)