make resume optional
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 28 Jul 2006 12:49:04 +0000 (12:49 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 28 Jul 2006 12:49:04 +0000 (12:49 +0000)
lib/python/Screens/InfoBar.py
lib/python/Screens/InfoBarGenerics.py

index ff8e73d205d6c9ff81055789a426f217498c17c6..471b1abe8a8e3078a70096f5907482524d5aa32e 100644 (file)
@@ -82,12 +82,12 @@ class MoviePlayer(InfoBarShowHide, \
                InfoBarServiceName, InfoBarSeek, InfoBarShowMovies, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications,
                InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView,
                InfoBarSummarySupport, InfoBarTeletextPlugin, InfoBarSubtitleSupport, Screen):
+
+       ENABLE_RESUME_SUPPORT = True
                
        def __init__(self, session, service):
                Screen.__init__(self, session)
                
-               self.is_closing = False
-               
                self["actions"] = HelpableActionMap(self, "MoviePlayerActions",
                        {
                                "leavePlayer": (self.leavePlayer, _("leave movie player..."))
index 42a7eb827b249d63779ebddf808f49c0fbe4ddf4..754b673ac04d3b91d5cea9ae4bde489acae4b124 100644 (file)
@@ -1445,6 +1445,8 @@ class InfoBarCueSheetSupport:
        CUT_TYPE_MARK = 2
        CUT_TYPE_LAST = 3
        
+       ENABLE_RESUME_SUPPORT = False
+       
        def __init__(self):
                self["CueSheetActions"] = HelpableActionMap(self, "InfobarCueSheetActions", 
                        {
@@ -1454,6 +1456,7 @@ class InfoBarCueSheetSupport:
                        }, prio=1) 
                
                self.cut_list = [ ]
+               self.is_closing = False
                self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
                        {
                                iPlayableService.evStart: self.__serviceStarted,
@@ -1465,16 +1468,17 @@ class InfoBarCueSheetSupport:
                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 self.ENABLE_RESUME_SUPPORT:
+                       last = None
                        
-               if last is not None:
-                       self.resume_point = last
-                       Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?"), timeout=10)
-       
+                       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()