diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-03-07 00:50:35 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-03-07 00:50:35 +0000 |
| commit | d473ac65efdd6132ee6c023a7bf27263d349007d (patch) | |
| tree | e22034918f8e82743aa064feeb9f9d444c0f9fb4 /lib/python | |
| parent | 4b3b4e2e84cc265cc14bd3c4deb91e48a4e74c4f (diff) | |
| download | enigma2-d473ac65efdd6132ee6c023a7bf27263d349007d.tar.gz enigma2-d473ac65efdd6132ee6c023a7bf27263d349007d.zip | |
add InfoBarTimeshiftState, fix timeshift after zap, fix seekactions
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 34a4821e..0531de95 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -554,8 +554,9 @@ class InfoBarSeek: if action[:5] == "seek:": time = int(action[5:]) self.screen.seekRelative(time * 90000) + return 1 else: - HelpableActionMap.action(self, contexts, action) + return HelpableActionMap.action(self, contexts, action) self["SeekActions"] = InfoBarSeekActionMap(self, "InfobarSeekActions", { @@ -805,12 +806,12 @@ class InfoBarSeek: if seekable is not None: seekable.seekRelative(1, diff) -from Screens.PVRState import PVRState +from Screens.PVRState import PVRState, TimeshiftState class InfoBarPVRState: - def __init__(self): + def __init__(self, screen=PVRState): self.onPlayStateChanged.append(self.__playStateChanged) - self.pvrStateDialog = self.session.instantiateDialog(PVRState) + self.pvrStateDialog = self.session.instantiateDialog(screen) self.onShow.append(self.__mayShow) self.onHide.append(self.pvrStateDialog.hide) @@ -823,6 +824,11 @@ class InfoBarPVRState: self.pvrStateDialog["state"].setText(playstateString) self.__mayShow() +class InfoBarTimeshiftState(InfoBarPVRState): + def __init__(self): + InfoBarPVRState.__init__(self, screen=TimeshiftState) + + class InfoBarShowMovies: # i don't really like this class. @@ -884,6 +890,7 @@ class InfoBarTimeshift: self.__event_tracker = ServiceEventTracker(screen=self, eventmap= { + iPlayableService.evStart: self.__serviceStarted, iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged }) @@ -903,7 +910,9 @@ class InfoBarTimeshift: print "hu, timeshift already enabled?" else: if not ts.startTimeshift(): + import time self.timeshift_enabled = 1 + self.pvrStateDialog["timeshift"].setRelative(time.time()) # PAUSE. self.setSeekState(self.SEEK_STATE_PAUSE) @@ -984,6 +993,10 @@ class InfoBarTimeshift: print "timeshift activate:", enabled self["TimeshiftActivateActions"].setEnabled(enabled) + def __serviceStarted(self): + self.timeshift_enabled = False + self.__seekableStatusChanged() + from RecordTimer import parseEvent class InfoBarInstantRecord: |
