Version: 2.2.2 (using KDE 4.3.4) OS: Linux Installed from: Fedora RPMs When playing songs in a playlist, Amarok will, on finishing the current song, first update score/play count etc, then select the next song in the playlist. This is broken. Amarok should first pick the next song in the playlist, _then_ update the current song. Consider the following playlist: Name Score Song A 10 Song B 5 Song C 20 In this case, the playlist will work as expected, playing the songs in the order A, B, C. Now lets sort the playlist on increasing score: Name Score Song B 5 Song A 10 Song C 20 Now, Amarok will play song B, then update the score of song B, which moves it to the end of the playlist. Amarok then selects the next song in the playlist, but since song B now is at the end of the playlist, Amarok will stop. For this specific case, the workaround is to enable Repeat playlist, but this does not generalize. Just add song D with a score of, say, 80: Name Score Song B 5 Song A 10 Song C 20 Song D 80 After playing song B, it will move to the second to last position, then song D will play (defeating the intended play order). Assuming Repeat playlist is set, then song A will play, after which it will be moved to the second to last position, then song D will play again, then song C, then song D once more.
this does look like a bug, but I haven't tried reproducing it
Confirmed bug still present in version 2.3. Still renders sorting of playlists on any automatically updated stat (e.g., score & last played) useless. Presumably does the same thing to manually updated stats, such as rating, title etc, but since that's the result of manual intervention, and not something that happens automatically, I figure that's OK.
Can somebody please try to reproduce this?
I think BUG 229926 and BUG 230191 are duplicates of this bug.
I suspect that most of this can be fixed as follows: - Move that one finishedPlaying() call out of PlaylistActions: handle it all in one place (EngineController). My unmerged pile already contains a patch for that. - EngineController and PlaylistActions have a somewhat rigid bi-directional coupling: Enginecontroller has hard-coded calls to 'The::playlistActions()->requestNextTrack()', which does a hard-coded call back into 'The::engineController()->play()'. I think 'The::playlistActions()->requestNextTrack()' should do the same thing as the track navigators function with that name: return a value, not do a 'play()' call. So the EngineController code would go from: if ( xyz ) The::playlistActions()->requestNextTrack(); to something like: void EngineController::setNextTrack( Meta::TrackPtr ... ) { ... } ... if ( xyz ) setNextTrack( The::playlistActions()->requestNextTrack() ); - And finally the specific fix for these bugs: in EngineController::slotAboutToFinish(), change the code from: m_currentTrack->finishedPlaying(); The::playlistActions()->requestNextTrack(); to something like this: nextTrack = The::playlistActions()->requestNextTrack(); m_currentTrack->finishedPlaying(); setNextTrack( The::playlistActions()->requestNextTrack() ); -- However, EngineController really isn't code I know well. This is not something that I'm planning to tackle alone.
*** Bug 229926 has been marked as a duplicate of this bug. ***
*** Bug 230191 has been marked as a duplicate of this bug. ***
Oops, copy-paste error, that last code should read: nextTrack = The::playlistActions()->requestNextTrack(); m_currentTrack->finishedPlaying(); setNextTrack( nextTrack ); (sorry if this is duplicated; bugs.kde.org is giving database timeout errors)
Changing target.
Setup: Amarok 2.3.2 KDE 4.4.5 Test Result: Same thing here. I have to refresh the playlist to show me the correct positions of the songs...
Bump version, confirmed by tester.
This is an automated message from the triager: Amarok 2.4.1 has been released on May 8 already. Could you please upgrade and test if you can still reproduce this bug? Without feedback within a month we will close this bug as resolved. Thank you for your understanding.
Closing for lack of feedback. Feel free to reopen if you can still reproduce this with Amarok 2.4.2 beta 1 or later and provide the necessary feedback.