Bug 127312

Summary: Amarok looses current track after Stop Playing After Track
Product: [Applications] amarok Reporter: Arend van Beelen jr. <arendjr>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 1.4-beta3   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Arend van Beelen jr. 2006-05-14 17:38:19 UTC
Version:           1.4-beta3 (using KDE Devel)
Installed from:    Compiled sources

When I select Stop Playing After Track on a song and the track finishes, Amarok acts as if the playlist is finished and forgets the current track. If I then press play again, the playlist is restarted at the beginning, rather than resuming after the last track (ie. with the next track). It would seem more consistent (and pleasant) if Stop Playing After Track acted more like a regular Stop action, so that when I start playing again it will resume where it left off.
Comment 1 Roland 2006-05-23 21:22:13 UTC
SVN commit 544148 by rolandg:

Stop Playing After Track: remember current track

BUG: 127312


 M  +1 -0      ChangeLog  
 M  +8 -1      src/playlist.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #544147:544148
@@ -21,6 +21,7 @@
       (BR 127043)
 
   BUGFIXES:
+    * Stop Playing after Track: remember current track (BR 127312)
     * Radio streams were broken for protocols other than http. (BR 127848)
     * Collection Browser would not set/unset/burn albums with ', The' in
       their name.
--- trunk/extragear/multimedia/amarok/src/playlist.cpp #544147:544148
@@ -1066,8 +1066,15 @@
         }
 
         m_stopAfterTrack = 0;
-        activate( 0 );
+        EngineController::instance()->stop();
 
+        if( !AmarokConfig::randomMode() ) {
+            item = MyIt::nextVisible( item );
+            while( item && ( !checkFileStatus( item ) || !item->exists() ) )
+                item = MyIt::nextVisible( item );
+            m_currentTrack = item;
+        }
+
         return;
     }