fixes bug #288
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 24 Jan 2010 12:24:37 +0000 (13:24 +0100)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 24 Jan 2010 13:10:09 +0000 (14:10 +0100)
last playing position for recorded services was stored only if between 1% and 99% of the recording's length. this lead to voodoo for the user, since long recordings naturally have a longer 1% than short ones.
so the 1% rule is gone now and we display the position of the marker in the message box, asking the user if playing should continue at this position.

lib/python/Screens/InfoBarGenerics.py
lib/service/servicedvb.cpp

index f2aff6c..8763108 100644 (file)
@@ -2015,8 +2015,10 @@ class InfoBarCueSheetSupport:
 
                        if last is not None:
                                self.resume_point = last
 
                        if last is not None:
                                self.resume_point = last
+                               
+                               l = last / 90000
                                if config.usage.on_movie_start.value == "ask":
                                if config.usage.on_movie_start.value == "ask":
-                                       Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?"), timeout=10)
+                                       Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?") + "\n" + (_("Resume position at %s") % ("%d:%02d:%02d" % (l/3600, l%3600/60, l%60))), timeout=10)
                                elif config.usage.on_movie_start.value == "resume":
 # TRANSLATORS: The string "Resuming playback" flashes for a moment
 # TRANSLATORS: at the start of a movie, when the user has selected
                                elif config.usage.on_movie_start.value == "resume":
 # TRANSLATORS: The string "Resuming playback" flashes for a moment
 # TRANSLATORS: at the start of a movie, when the user has selected
index 9f10644..558bf0c 100644 (file)
@@ -1128,11 +1128,7 @@ RESULT eDVBServicePlay::stop()
                        
                        if (length)
                        {
                        
                        if (length)
                        {
-                               int perc = play_position * 100LL / length;
-                       
-                                       /* only store last play position when between 1% and 99% */
-                               if ((1 < perc) && (perc < 99))
-                                       m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */
+                               m_cue_entries.insert(cueEntry(play_position, 3)); /* last play position */
                        }
                        m_cuesheet_changed = 1;
                }
                        }
                        m_cuesheet_changed = 1;
                }