aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-03-07 00:50:35 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-03-07 00:50:35 +0000
commitd473ac65efdd6132ee6c023a7bf27263d349007d (patch)
treee22034918f8e82743aa064feeb9f9d444c0f9fb4 /lib/python
parent4b3b4e2e84cc265cc14bd3c4deb91e48a4e74c4f (diff)
downloadenigma2-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.py21
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: