X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/0d1f59e4a4c6b096b18cac11876066e3384c4b3a..b52a614903cab3c3b8d1a1eae871d3bdefa926ce:/lib/python/Plugins/Extensions/DVDPlayer/plugin.py diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 3ecd9f8a..a44d042b 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -10,7 +10,7 @@ from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueShee from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap from Components.Label import Label from Components.FileList import FileList -from Components.ServiceEventTracker import ServiceEventTracker +from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase from Components.config import config from Components.ProgressBar import ProgressBar from ServiceReference import ServiceReference @@ -147,7 +147,7 @@ class ChapterZap(Screen): self.Timer.callback.append(self.keyOK) self.Timer.start(3000, True) -class DVDPlayer(Screen, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSupport, InfoBarPVRState, InfoBarShowHide, HelpableScreen): +class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSupport, InfoBarPVRState, InfoBarShowHide, HelpableScreen): ALLOW_SUSPEND = True ENABLE_RESUME_SUPPORT = True @@ -220,6 +220,7 @@ class DVDPlayer(Screen, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSuppor def __init__(self, session, args = None): Screen.__init__(self, session) + InfoBarBase.__init__(self) InfoBarNotifications.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap = "MediaPlayerCueSheetActions") InfoBarShowHide.__init__(self) @@ -338,10 +339,12 @@ class DVDPlayer(Screen, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSuppor def __menuOpened(self): self.hide() self.in_menu = True + self["NumberActions"].setEnabled(False) def __menuClosed(self): self.show() self.in_menu = False + self["NumberActions"].setEnabled(True) def setChapterLabel(self): chapterLCD = "Menu" @@ -528,6 +531,12 @@ class DVDPlayer(Screen, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSuppor self.restore_infobar_seek_config() self.session.nav.playService(self.oldService) + def playLastCB(self, answer): # overwrite infobar cuesheet function + print "playLastCB", answer, self.resume_point +# if answer == True: +# self.doSeek(self.resume_point) + self.hideAfterResume() + def showAfterCuesheetOperation(self): if not self.in_menu: self.show() @@ -536,6 +545,13 @@ class DVDPlayer(Screen, InfoBarNotifications, InfoBarSeek, InfoBarCueSheetSuppor print "DVDCreateSummary" return DVDSummary +#override some InfoBarSeek functions + def doEof(self): + self.setSeekState(self.SEEK_STATE_PLAY) + + def calcRemainingTime(self): + return 0 + def main(session, **kwargs): session.open(DVDPlayer)