Bug 127312 - Amarok looses current track after Stop Playing After Track
Summary: Amarok looses current track after Stop Playing After Track
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.4-beta3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-14 17:38 UTC by Arend van Beelen jr.
Modified: 2006-06-11 12:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;
     }