def __init__(self, session, args=None): Screen.__init__(self, session) InfoBarAudioSelection.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap="MediaPlayerCueSheetActions") InfoBarNotifications.__init__(self) InfoBarBase.__init__(self) InfoBarScreenSaver.__init__(self) InfoBarSubtitleSupport.__init__(self) HelpableScreen.__init__(self) self.summary = None self.oldService = self.session.nav.getCurrentlyPlayingServiceReference( ) self.session.nav.stopService() self.playlistparsers = {} self.addPlaylistParser(PlaylistIOM3U, "m3u") self.addPlaylistParser(PlaylistIOPLS, "pls") self.addPlaylistParser(PlaylistIOInternal, "e2pls") # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() self.filelist = FileList( defaultDir, matchingPattern= "(?i)^.*\.(mp2|mp3|ogg|ts|mts|m2ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|flv|mov|dts|3gp|3g2|asf|wmv|wma)", useServiceRef=True, additionalExtensions="4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() self.is_closing = False self.delname = "" self.playlistname = "" self["playlist"] = self.playlist self["PositionGauge"] = ServicePositionGauge(self.session.nav) self["currenttext"] = Label("") self["artisttext"] = Label(_("Artist") + ':') self["artist"] = Label("") self["titletext"] = Label(_("Title") + ':') self["title"] = Label("") self["albumtext"] = Label(_("Album") + ':') self["album"] = Label("") self["yeartext"] = Label(_("Year") + ':') self["year"] = Label("") self["genretext"] = Label(_("Genre") + ':') self["genre"] = Label("") self["coverArt"] = MediaPixmap() self["repeat"] = MultiPixmap() self.seek_target = None try: from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier hotplugNotifier.append(self.hotplugCB) except Exception, ex: print "[MediaPlayer] No hotplug support", ex
def __init__(self, session, service): self.skin = CutListEditor.skin Screen.__init__(self, session) InfoBarSeek.__init__(self, actionmap="CutlistSeekActions") InfoBarCueSheetSupport.__init__(self) InfoBarBase.__init__(self, steal_current_service=True) HelpableScreen.__init__(self) self.old_service = session.nav.getCurrentlyPlayingServiceReference() session.nav.playService(service) service = session.nav.getCurrentService() cue = service and service.cueSheet() if cue is not None: # disable cutlists. we want to freely browse around in the movie print("cut lists disabled!") cue.setCutListEnable(0) self.downloadCuesheet() self["Timeline"] = ServicePositionGauge(self.session.nav) self["cutlist"] = List(self.getCutlist()) self["cutlist"].onSelectionChanged.append(self.selectionChanged) self["SeekState"] = Label() self.onPlayStateChanged.append(self.updateStateLabel) self.updateStateLabel(self.seekstate) desktopSize = getDesktop(0).size() self["Video"] = VideoWindow(decoder=0, fb_width=desktopSize.width(), fb_height=desktopSize.height()) self["actions"] = HelpableActionMap( self, "CutListEditorActions", { "setIn": (self.setIn, _("Make this mark an 'in' point")), "setOut": (self.setOut, _("Make this mark an 'out' point")), "setMark": (self.setMark, _("Make this mark just a mark")), "addMark": (self.__addMark, _("Add a mark")), "removeMark": (self.__removeMark, _("Remove a mark")), "removeAll": (self.__removeAll, _("Remove all cuts and marks")), "leave": (self.exit, _("Exit editor")), "showMenu": (self.showMenu, _("menu")), }, prio=-4) self.tutorial_seen = False self.onExecBegin.append(self.showTutorial) self.__event_tracker = ServiceEventTracker( screen=self, eventmap={iPlayableService.evCuesheetChanged: self.refillList}) # to track new entries we save the last version of the cutlist self.last_cuts = self.getCutlist() self.cut_start = None self.inhibit_seek = False self.onClose.append(self.__onClose)
def __init__(self, session, args = None): Screen.__init__(self, session) InfoBarAudioSelection.__init__(self) InfoBarAspectSelection.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap = "MediaPlayerCueSheetActions") InfoBarNotifications.__init__(self) InfoBarBase.__init__(self) InfoBarScreenSaver.__init__(self) InfoBarSubtitleSupport.__init__(self) HelpableScreen.__init__(self) self.summary = None self.oldService = self.session.nav.getCurrentlyPlayingServiceOrGroup() self.session.nav.stopService() self.setTitle(_("Media player")) self.playlistparsers = {} self.addPlaylistParser(PlaylistIOM3U, "m3u") self.addPlaylistParser(PlaylistIOPLS, "pls") self.addPlaylistParser(PlaylistIOInternal, "e2pls") # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(dts|mp3|wav|wave|wv|oga|ogg|flac|m4a|mp2|m2a|wma|ac3|mka|aac|ape|alac|mpg|vob|m4v|mkv|avi|divx|dat|flv|mp4|mov|wmv|asf|3gp|3g2|mpeg|mpe|rm|rmvb|ogm|ogv|m2ts|mts|ts|m3u|e2pls|pls|amr|au|mid|pva|wtv)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() self.is_closing = False self.delname = "" self.playlistname = "" self["playlist"] = self.playlist self["PositionGauge"] = ServicePositionGauge(self.session.nav) self["currenttext"] = Label("") self["artisttext"] = Label(_("Artist")+':') self["artist"] = Label("") self["titletext"] = Label(_("Title")+':') self["title"] = Label("") self["albumtext"] = Label(_("Album")+':') self["album"] = Label("") self["yeartext"] = Label(_("Year")+':') self["year"] = Label("") self["genretext"] = Label(_("Genre")+':') self["genre"] = Label("") self["coverArt"] = MediaPixmap() self["repeat"] = MultiPixmap() self.seek_target = None try: from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier hotplugNotifier.append(self.hotplugCB) except Exception as ex: print("[MediaPlayer] No hotplug support", ex) class MoviePlayerActionMap(NumberActionMap): def __init__(self, player, contexts = [ ], actions = { }, prio=0): NumberActionMap.__init__(self, contexts, actions, prio) self.player = player def action(self, contexts, action): self.player.show() return NumberActionMap.action(self, contexts, action) self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", { "ok": (self.ok, _("Add file to playlist")), "cancel": (self.exit, _("Exit mediaplayer")), }, -2) self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions", { "play": (self.xplayEntry, _("Play entry")), "pause": (self.pauseEntry, _("Pause")), "stop": (self.stopEntry, _("Stop entry")), "previous": (self.previousMarkOrEntry, _("Play from previous mark or playlist entry")), "next": (self.nextMarkOrEntry, _("Play from next mark or playlist entry")), "menu": (self.showMenu, _("Menu")), "skipListbegin": (self.skip_listbegin, _("Jump to beginning of list")), "skipListend": (self.skip_listend, _("Jump to end of list")), "prevBouquet": (self.prevBouquet, self.prevBouquetHelpText), "nextBouquet": (self.nextBouquet, self.nextBouquetHelptext), "delete": (self.deletePlaylistEntry, _("Delete playlist entry")), "shift_stop": (self.clear_playlist, _("Clear playlist")), "shift_record": (self.playlist.PlayListShuffle, _("Shuffle playlist")), "subtitles": (self.subtitleSelection, _("Subtitle selection")), }, -2) self["InfobarEPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { "showEventInfo": (self.showEventInformation, _("show event details")), }) self["actions"] = MoviePlayerActionMap(self, ["DirectionActions"], { "right": self.rightDown, "rightRepeated": self.doNothing, "rightUp": self.rightUp, "left": self.leftDown, "leftRepeated": self.doNothing, "leftUp": self.leftUp, "up": self.up, "upRepeated": self.up, "upUp": self.doNothing, "down": self.down, "downRepeated": self.down, "downUp": self.doNothing, }, -2) InfoBarSeek.__init__(self, actionmap = "MediaPlayerSeekActions") self.mediaPlayerInfoBar = self.session.instantiateDialog(MediaPlayerInfoBar) self.onClose.append(self.delMPTimer) self.onClose.append(self.__onClose) self.onShow.append(self.timerHideMediaPlayerInfoBar) self.righttimer = False self.rightKeyTimer = eTimer() self.rightKeyTimer.callback.append(self.rightTimerFire) self.lefttimer = False self.leftKeyTimer = eTimer() self.leftKeyTimer.callback.append(self.leftTimerFire) self.hideMediaPlayerInfoBar = eTimer() self.hideMediaPlayerInfoBar.callback.append(self.timerHideMediaPlayerInfoBar) self.currList = "filelist" self.isAudioCD = False self.ext = None self.AudioCD_albuminfo = {} self.cdAudioTrackFiles = [] self.onShown.append(self.applySettings) self.playlistIOInternal = PlaylistIOInternal() list = self.playlistIOInternal.open(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) if list: for x in list: self.playlist.addFile(x.ref) self.playlist.updateList() self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evUpdatedInfo: self.__evUpdatedInfo, iPlayableService.evUser+10: self.__evAudioDecodeError, iPlayableService.evUser+11: self.__evVideoDecodeError, iPlayableService.evUser+12: self.__evPluginError, iPlayableService.evUser+13: self["coverArt"].embeddedCoverArt }) self.servicelist = None self.pipZapAvailable = False if InfoBar.instance is not None: self.servicelist = InfoBar.instance.servicelist if self.servicelist and hasattr(self.servicelist, 'dopipzap'): self.pipZapAvailable = SystemInfo.get("NumVideoDecoders", 1) > 1
def __init__(self, session, service): self.skin = CutListEditor.skin Screen.__init__(self, session) Screen.setTitle(self, _("Cutlist editor")) InfoBarSeek.__init__(self, actionmap=["CutlistSeekActions"]) InfoBarCueSheetSupport.__init__(self) InfoBarBase.__init__(self, steal_current_service=True) HelpableScreen.__init__(self) self.old_service = session.nav.getCurrentlyPlayingServiceReference() self.service = service session.nav.playService(service) self.pauseService() # disable cutlists. we want to freely browse around in the movie # However, downloading and uploading the cue sheet restores the # default state, so we need to keep disabling it. self.cut_state = 2 self.getCuesheet() # preserve the original cuts to possibly restore them later self.prev_cuts = self.cut_list[:] self.last_mark = [ x for x in self.prev_cuts if x[1] == self.CUT_TYPE_LAST ] self.edited = False self.MovieSelection = isinstance( self.session.current_dialog, MovieSelection) and self.session.current_dialog self["InLen"] = Label() self["OutLen"] = Label() self["Timeline"] = ServicePositionGauge(self.session.nav) self["cutlist"] = List(self.getCutlist()) self["cutlist"].onSelectionChanged.append(self.selectionChanged) self["SeekState"] = Label() self.onPlayStateChanged.append(self.updateStateLabel) self.updateStateLabel(self.seekstate) self["key_red"] = Label(_("Start cut")) self["key_green"] = Label(_("End cut")) self["key_yellow"] = Label(_("Step back")) self["key_blue"] = Label(_("Step forward")) self["SeekActions"].actions.update({"stepFwd": self.stepFwd}) self.helpList.append( (self["SeekActions"], "CutlistSeekActions", [("stepFwd", _("Step forward"))])) desktopSize = getDesktop(0).size() self["Video"] = VideoWindow(decoder=0, fb_width=desktopSize.width(), fb_height=desktopSize.height()) self["actions"] = HelpableActionMap(self, ["CutListEditorActions"], { "setIn": (self.setIn, _("Make this mark an 'in' point")), "setOut": (self.setOut, _("Make this mark an 'out' point")), "setStart": (self.setStart, _("Make this mark the initial 'in' point")), "setEnd": (self.setEnd, _("Make this mark the final 'out' point")), "setMark": (self.setMark, _("Make this mark just a mark")), "addMark": (self.__addMark, _("Add a mark")), "removeMark": (self.__removeMark, _("Remove a mark")), "execute": (self.execute, _("Execute cuts and exit")), "quickExecute": (self.quickExecute, _("Quick execute...")), "leave": (self.exit, _("Exit editor")), "showMenu": (self.showMenu, _("Menu")), "backMenu": (self.backMenu, _("Restore previous cuts...")), }, prio=-4) self.onExecBegin.append(self.showTutorial) self.__event_tracker = ServiceEventTracker( screen=self, eventmap={iPlayableService.evCuesheetChanged: self.refillList}) # to track new entries we save the last version of the cutlist self.last_cuts = self.getCutlist() self.cut_start = None self.cut_end = None self.state = CutListContextMenu.SHOW_DELETECUT self.inhibit_seek = False self.inhibit_cut = False self.onClose.append(self.__onClose) # Use onShown to set the initial list index, since apparently that doesn't # work from here. self.onShown.append(self.__onShown)
def __init__(self, session, args = None): Screen.__init__(self, session) InfoBarAudioSelection.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap = "MediaPlayerCueSheetActions") InfoBarNotifications.__init__(self) InfoBarBase.__init__(self) InfoBarSubtitleSupport.__init__(self) HelpableScreen.__init__(self) self.summary = None self.oldService = self.session.nav.getCurrentlyPlayingServiceReference() self.session.nav.stopService() self.playlistparsers = {} self.addPlaylistParser(PlaylistIOM3U, "m3u") self.addPlaylistParser(PlaylistIOPLS, "pls") self.addPlaylistParser(PlaylistIOInternal, "e2pls") # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov|m2ts|flv|dts|3gp|3g2|mts|wmv|asf|wma)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() self.is_closing = False self.delname = "" self["playlist"] = self.playlist self["PositionGauge"] = ServicePositionGauge(self.session.nav) self["currenttext"] = Label("") self["artisttext"] = Label(_("Artist")+':') self["artist"] = Label("") self["titletext"] = Label(_("Title")+':') self["title"] = Label("") self["albumtext"] = Label(_("Album")+':') self["album"] = Label("") self["yeartext"] = Label(_("Year")+':') self["year"] = Label("") self["genretext"] = Label(_("Genre")+':') self["genre"] = Label("") self["coverArt"] = MediaPixmap() self["repeat"] = MultiPixmap() self.seek_target = None # ikseong # from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier # hotplugNotifier.append(self.hotplugCB) class MoviePlayerActionMap(NumberActionMap): def __init__(self, player, contexts = [ ], actions = { }, prio=0): NumberActionMap.__init__(self, contexts, actions, prio) self.player = player def action(self, contexts, action): self.player.show() return NumberActionMap.action(self, contexts, action) self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", { "ok": (self.ok, _("add file to playlist")), "cancel": (self.exit, _("exit mediaplayer")), }, -2) self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions", { "play": (self.xplayEntry, _("play entry")), "pause": (self.pauseEntry, _("pause")), "stop": (self.stopEntry, _("stop entry")), "previous": (self.previousMarkOrEntry, _("play from previous mark or playlist entry")), "next": (self.nextMarkOrEntry, _("play from next mark or playlist entry")), "menu": (self.showMenu, _("menu")), "skipListbegin": (self.skip_listbegin, _("jump to listbegin")), "skipListend": (self.skip_listend, _("jump to listend")), "prevBouquet": (self.switchToPlayList, _("switch to playlist")), "nextBouquet": (self.switchToFileList, _("switch to filelist")), "delete": (self.deletePlaylistEntry, _("delete playlist entry")), #ikseong # "shift_stop": (self.clear_playlist, _("clear playlist")), # "shift_record": (self.playlist.PlayListShuffle, _("shuffle playlist")), "shift_stop": self.clear_playlist, "shift_record": self.playlist.PlayListShuffle, "subtitles": (self.subtitleSelection, _("Subtitle selection")), }, -2) self["InfobarEPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { "showEventInfo": (self.showEventInformation, _("show event details")), }) self["actions"] = MoviePlayerActionMap(self, ["DirectionActions"], { "right": self.rightDown, "rightRepeated": self.doNothing, "rightUp": self.rightUp, "left": self.leftDown, "leftRepeated": self.doNothing, "leftUp": self.leftUp, "up": self.up, "upRepeated": self.up, "upUp": self.doNothing, "down": self.down, "downRepeated": self.down, "downUp": self.doNothing, }, -2) InfoBarSeek.__init__(self, actionmap = "MediaPlayerSeekActions") self.onClose.append(self.delMPTimer) self.onClose.append(self.__onClose) self.righttimer = False self.rightKeyTimer = eTimer() self.rightKeyTimer.callback.append(self.rightTimerFire) self.lefttimer = False self.leftKeyTimer = eTimer() self.leftKeyTimer.callback.append(self.leftTimerFire) self.currList = "filelist" self.isAudioCD = False self.AudioCD_albuminfo = {} self.cdAudioTrackFiles = [] self.onShown.append(self.applySettings) self.playlistIOInternal = PlaylistIOInternal() list = self.playlistIOInternal.open(resolveFilename(SCOPE_CONFIG, "playlist.e2pls")) if list: for x in list: self.playlist.addFile(x.ref) self.playlist.updateList() self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evUpdatedInfo: self.__evUpdatedInfo, iPlayableService.evUser+10: self.__evAudioDecodeError, iPlayableService.evUser+11: self.__evVideoDecodeError, iPlayableService.evUser+12: self.__evPluginError, iPlayableService.evUser+13: self["coverArt"].embeddedCoverArt })
def __init__(self, session): Screen.__init__(self, session) HelpableScreen.__init__(self) self.bScreen = self.session.instantiateDialog(Blackscreen) self.bScreen.show() self.myaudioScreenSaverconfig = int(config.plugins.EVOMC_saver.myaudioScreenSaver.value) self.myaudioScreenSaverTimer = eTimer() self.myaudioScreenSaverTimer.timeout.get().append(self.myaudioScreenSaverTimer_Timeout) self.ResetmyaudioScreenSaverTimer() self.start_timer = eTimer() self.moveTimer = eTimer() self.start_timer.timeout.get().append(self.onLayoutFinished) self.isVisible = True self.oldService = self.session.nav.getCurrentlyPlayingServiceReference() self.skindir = "/usr/lib/enigma2/python/Plugins/Extensions/EVOMediaCenter/skins/basic" self.coverArtFileName = "" self["PositionGauge"] = ServicePositionGauge(self.session.nav) self["key_red"] = Button(_("Delete")) self["key_green"] = Button(_("Play All")) self["key_yellow"] = Button(_("Favorites")) self["key_blue"] = Button(_("Settings")) self["fileinfo"] = Label() self["coverArt"] = MediaPixmap() self["currentfolder"] = Label() self["currentfavname"] = Label() self.playlist = MyPlayList() self.currList = "filelist" self.curfavfolder = -1 self["play"] = Pixmap() self["stop"] = Pixmap() self["curplayingtitle"] = Label() self.currPlaying = 0 self.PlaySingle = 0 self.PlaySingleRUN = 0 self.PlayAll = 0 self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { iPlayableService.evEOF: self.doEOF, iPlayableService.evStopped: self.StopPlayback, iPlayableService.evUser+11: self.__evDecodeError, iPlayableService.evUser+12: self.__evPluginError, iPlayableService.evUser+13: self["coverArt"].embeddedCoverArt }) self["actions"] = HelpableActionMap(self, "EVOMC_AudioPlayerActions", { "ok": (self.KeyPlaySingle, "Play selected file"), "left": (self.leftUp, "List Top"), "right": (self.rightDown, "List Bottom"), "up": (self.up, "List up"), "down": (self.down, "List down"), "menu": (self.KeyMenu, "File / Folder Options"), "video": (self.visibility, "Show / Hide Player"), "nextBouquet": (self.NextFavFolder, "Next Favorite Folder"), "prevBouquet": (self.PrevFavFolder, "Previous Favorite Folder"), "red": (self.deleteFile, "Delete File"), "green": (self.KeyPlayAll, "Play All"), "yellow": (self.FavoriteFolders, "Favorite Folders"), "blue": (self.Settings, "Settings"), }, -2) self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", { "cancel": (self.Exit, "Exit Audio Player"), }, -2) self["InfobarShowHideActions"] = HelpableActionMap(self, "InfobarShowHideActions", { "toggleShow": (self.showFileInfo, "Show File Info"), }, -2) self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions", { "stop": (self.StopPlayback, "Stop Playback"), }, -2) self.aspect = getAspect() currDir = config.plugins.EVOMC_ap.lastDir.value if not pathExists(currDir): currDir = "/" self["currentfolder"].setText(str(currDir)) self.filelist = FileList(currDir, useServiceRef = True, showDirectories = True, showFiles = True, matchingPattern = "(?i)^.*\.(mp3|ogg|wma|wav|wave|flac|m4a)") self["filelist"] = self.filelist self["thumbnail"] = Pixmap() evfd.getInstance().vfd_write_string("EVO-AUDIOPLAYER") self.ThumbTimer = eTimer() self.ThumbTimer.callback.append(self.showThumb) self.ThumbTimer.start(config.plugins.EVOMC_ap.preview_delay.getValue() * 1000, True) self.DimmerTimer = eTimer() self.DimmerTimer.callback.append(self.showDimmer) self.DimmerTimer.start(config.plugins.EVOMC_all.dimmer_delay.getValue() * 1000, True) self.BlinkingPlayIconTimer = eTimer() self.BlinkingPlayIconTimer.callback.append(self.BlinkingPlayIcon) self.blinking=False self.FileInfoTimer = eTimer() self.FileInfoTimer.callback.append(self.updateFileInfo) self.myaudioScreenSaverconfig = int(config.plugins.EVOMC_saver.myaudioScreenSaver.value) self.ResetmyaudioScreenSaverTimer()
def __init__(self, session, args=None): Screen.__init__(self, session) InfoBarAudioSelection.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap="DivXPlayerCueSheetActions") InfoBarNotifications.__init__(self) InfoBarBase.__init__(self) InfoBarSubtitleSupport.__init__(self) HelpableScreen.__init__(self) self.container = eConsoleAppContainer() self.summary = None self.oldService = self.session.nav.getCurrentlyPlayingServiceReference( ) self.session.nav.stopService() # 'None' is magic to start at the list of mountpoints self.filelist = FileList( None, matchingPattern="(?i)^.*\.(avi)", useServiceRef=True, additionalExtensions="4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.is_closing = False self.delname = "" self.next_operation = "" self.lastServicePlayed = None self.current_service = None self["PositionGauge"] = ServicePositionGauge(self.session.nav) self["currenttext"] = Label("") self.repeat = False self.seek_target = None class DivXPlayerActionMap(NumberActionMap): def __init__(self, player, contexts=[], actions={}, prio=0): NumberActionMap.__init__(self, contexts, actions, prio) self.player = player def action(self, contexts, action): self.player.show() return NumberActionMap.action(self, contexts, action) self["OkCancelActions"] = HelpableActionMap( self, "OkCancelActions", { "ok": (self.ok, _("play divx file")), "cancel": (self.exit, _("exit divxplayer")), }, -2) self["DivXPlayerActions"] = HelpableActionMap( self, "DivXPlayerActions", { "play": (self.playEntry, _("play entry")), "pause": (self.pauseEntry, _("pause")), "stop": (self.stopEntry, _("stop entry")), "forward": (self.forwardEntry, _("forward entry")), "backward": (self.doNothing, _("backward entry")), "menu": (self.showMenu, _("menu")), }, -2) self["actions"] = DivXPlayerActionMap( self, ["DirectionActions"], { "right": self.right, "left": self.left, "up": self.up, "upRepeated": self.up, "upUp": self.doNothing, "down": self.down, "downRepeated": self.down, "downUp": self.doNothing, }, -2) InfoBarSeek.__init__(self, actionmap="DivXPlayerSeekActions") self.onClose.append(self.__onClose) self.__event_tracker = ServiceEventTracker( screen=self, eventmap={ iPlayableService.evUser + 11: self.__evDecodeError, iPlayableService.evUser + 12: self.__evPluginError })