Bug 229926

Summary: playlist hangs in endless loop if sort by play count is used.
Product: [Applications] amarok Reporter: S. Burmeister <sven.burmeister>
Component: PlaylistAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nhn, teo
Priority: NOR    
Version First Reported In: 2.3-GIT   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description S. Burmeister 2010-03-08 11:43:58 UTC
Version:           2.3 svn (using KDE 4.4.1)
OS:                Linux
Installed from:    openSUSE RPMs

If one sorts the playlist by rating (best rated first) > play count (most played first) the played track's play count gets increased by one after it finished and thus played again after the next song. An example of how the playlist behaves.

song 1 (played 6 times) 
song 2 (played 6 times) playing

song 2 (played 7 times) finshed, play count increased by one
song 1 (played 6 times) playing

song 1 (played 7 times) finshed, play count increased by one
song 2 (played 7 times) playing

song 2 (played 8 times) finshed, play count increased by one
song 1 (played 7 times) playing

This goes on forever.

Expected behaviour, play the playlist as is and do not re-sort before it makes sense, i.e. at least until the user stops the music. As there is only "pause" this might be a bit tricky.
Comment 1 S. Burmeister 2010-03-08 12:08:09 UTC
It's actually a bit more complicated to reproduce:

song 1 (play count 12) 
song 2 (play count 11) playing
song 3 (play count 8)

song 2 (play count 12) finshed, play count increased by one
song 1 (play count 12) playing
song 3 (play count 8)

song 1 (play count 13) finshed, play count increased by one
song 2 (play count 12) playing
song 3 (play count 8)


song 2 (play count 14) finshed, play count increased by one
song 1 (play count 13) playing
song 3 (play count 8)

And so on.

The fact that there is a play count of 12,11,8 is partly due to bug 229927. But might happen during "normal usage" as well, e.g. when the user plays/selects some tracks manually, either by double-clicking or the "play next..." feature.

In any case, this loop must not happen.
Comment 2 Sven Krohlas 2010-03-21 01:18:16 UTC

*** This bug has been marked as a duplicate of bug 224003 ***