aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-07-24 13:50:08 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-07-24 13:50:08 +0000
commitc0c3ad376851ef7b62fe65fe725f655ba1ae5598 (patch)
tree5f5008146ef0c99c6f33ff53f12a7ab42bb8a005 /lib/python
parent21fcf0d958b173859bb814dee4ee1997d7a7e37a (diff)
downloadenigma2-c0c3ad376851ef7b62fe65fe725f655ba1ae5598.tar.gz
enigma2-c0c3ad376851ef7b62fe65fe725f655ba1ae5598.zip
ask to resume on playback
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/InfoBar.py3
-rw-r--r--lib/python/Screens/InfoBarGenerics.py19
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py
index 9d3e327c..ff8e73d2 100644
--- a/lib/python/Screens/InfoBar.py
+++ b/lib/python/Screens/InfoBar.py
@@ -86,6 +86,8 @@ class MoviePlayer(InfoBarShowHide, \
def __init__(self, session, service):
Screen.__init__(self, session)
+ self.is_closing = False
+
self["actions"] = HelpableActionMap(self, "MoviePlayerActions",
{
"leavePlayer": (self.leavePlayer, _("leave movie player..."))
@@ -102,6 +104,7 @@ class MoviePlayer(InfoBarShowHide, \
self.session.nav.playService(service)
def leavePlayer(self):
+ self.is_closing = True
self.session.openWithCallback(self.leavePlayerConfirmed, MessageBox, _("Stop playing this movie?"))
def leavePlayerConfirmed(self, answer):
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index 9b6712e5..42a7eb82 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -1443,6 +1443,7 @@ class InfoBarCueSheetSupport:
CUT_TYPE_IN = 0
CUT_TYPE_OUT = 1
CUT_TYPE_MARK = 2
+ CUT_TYPE_LAST = 3
def __init__(self):
self["CueSheetActions"] = HelpableActionMap(self, "InfobarCueSheetActions",
@@ -1459,8 +1460,26 @@ class InfoBarCueSheetSupport:
})
def __serviceStarted(self):
+ if self.is_closing:
+ return
print "new service started! trying to download cuts!"
self.downloadCuesheet()
+
+ last = None
+
+ for (pts, what) in self.cut_list:
+ if what == self.CUT_TYPE_LAST:
+ last = pts
+
+ if last is not None:
+ self.resume_point = last
+ Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?"), timeout=10)
+
+ def playLastCB(self, answer):
+ if answer == True:
+ seekable = self.__getSeekable()
+ if seekable is not None:
+ seekable.seekTo(self.resume_point)
def __getSeekable(self):
service = self.session.nav.getCurrentService()