Bug 231209 - change track after "stopping playing after this track"
Summary: change track after "stopping playing after this track"
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.3.0
Platform: openSUSE Unspecified
: NOR normal
Target Milestone: 2.3.1
Assignee: Amarok Developers
URL:
Keywords:
: 237090 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-18 11:56 UTC by Silver Salonen
Modified: 2010-05-30 17:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.3.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silver Salonen 2010-03-18 11:56:21 UTC
Version:           2.3.0 (using KDE 4.4.1)
Installed from:    openSUSE RPMs

When "Stop Playing After This Track" is set and playing stops, the next track is not selected (although the track will change when pressing Play).

It's just a bit confusing, because it seems like the "stopped playing after this" track is active and starts playing again.
Comment 1 Sven Krohlas 2010-03-18 12:11:06 UTC
Yep, I can confirm this.
Comment 2 Marcelo Vanzin 2010-04-03 21:36:03 UTC
Actually, this seems to have an effect when you quit / restart amarok:

1. Start playing the playlist.
2. Choose "stop after current track".
3. Wait for playback to stop, quit amarok.
4. Start amarok.
5. Press play.

Amarok will play the same track again, instead of playing the next one.
Comment 3 Sven Krohlas 2010-05-10 17:53:54 UTC
*** Bug 237090 has been marked as a duplicate of this bug. ***
Comment 4 Rick W. Chen 2010-05-30 16:58:42 UTC
commit 0b36fc90a2727adbaf68111b94a587d560946122
Author: Rick W. Chen <stuffcorpse@archlinux.us>
Date:   Mon May 31 02:47:51 2010 +1200

    Fix track not changing for "stop after current track" action
    
    BUG: 231209

diff --git a/ChangeLog b/ChangeLog
index fb3a4d3..9d4b0f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,7 @@ VERSION 2.3.2-Beta 1
       Patch by Richard Longland <rlongland@hotmail.com>.
 
   BUGFIXES:
+    * Fixed tracks not changing for "stop after this track" action. (BR 231209)
     * Cleaned up some tooltips/what's this strings in the Organize dialog
       to make it easier to read and, hopefully, understand. (BR 237857)
     * Fixed organize dialog's handling of the year tag. If there is no year
diff --git a/src/playlist/PlaylistActions.cpp b/src/playlist/PlaylistActions.cpp
index 453ddaa..c114e04 100644
--- a/src/playlist/PlaylistActions.cpp
+++ b/src/playlist/PlaylistActions.cpp
@@ -135,10 +135,15 @@ Playlist::Actions::requestNextTrack()
         return;
     }
 
-    if ( stopAfterMode() == StopAfterCurrent )  //stop after current / stop after track starts here
+    if( stopAfterMode() == StopAfterCurrent )  //stop after current / stop after track starts here
+    {
+        The::playlist()->setActiveId( m_nextTrackCandidate );
         setStopAfterMode( StopNever );
+    }
     else
+    {
         play( m_nextTrackCandidate, false );
+    }
 }
 
 void