Bug 188330 - Playcount increased by 2 by "Stop Playing After Track"
Summary: Playcount increased by 2 by "Stop Playing After Track"
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playback (show other bugs)
Version: 2.3-GIT
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 192037 202837 204028 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-28 13:06 UTC by Stefan Becker
Modified: 2009-08-25 12:21 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Becker 2009-03-28 13:06:53 UTC
Version:           2.0.2 (using KDE 4.2.1)
OS:                Linux
Installed from:    Fedora RPMs

I have a random playlist with filter "PlayCount less than 3" (not sure if this is important).

 - song on playlist with playcount = 2
 - song gets played
 - playcount increased to 3 -> CORRECT
 - next song on playlist with playcount = 2
 - song gets played
 - select "Stop Playing After Track"
 - playing stops after song
 - playcount increased to 5 -> WRONG

This is reproducible.
Comment 1 Stefan Becker 2009-03-28 15:14:57 UTC
When OSD is enabled you see it flickering up twice after the end of the song. I guess those are the two additional play attempts that go into the playcounter.

The bug also happens when OSD is disabled, so it is not caused by it.
Comment 2 Myriam Schweingruber 2009-03-29 13:05:35 UTC
I can't reproduce it in SVN, build 29.03.2009, OSD disabled. So it is seems fixed.
Comment 3 Stefan Becker 2009-03-30 09:27:54 UTC
I just reproduced it with Amarok 2.1 SVN 946593 on Fedora 11. The only difference is that it now increases it only by 2 instead of 3.

It still doesn't matter if OSD is enabled or not.
Comment 4 Dan Meltzer 2009-03-30 15:26:44 UTC
What phonon backend are you using?
Comment 5 Stefan Becker 2009-03-31 06:23:33 UTC
I'm using phonon-backend-xine.
Comment 6 Mark Kretschmann 2009-04-28 10:19:19 UTC
Yes, it's true: I can reproduce this with SVN trunk.

However, this only happens if you _keep_ the track in the "Stop Playing.." state, and then play the same track again.

I would argue that Amarok should automatically remove the "Stop Playing.." state from the track, after it has stopped once. This also makes sense usability wise, as the menu text currently still says "Stop Playing..", even if it's already active. Not very logical.


Incidentally this change might also fix the bug we are talking about.
Comment 7 Mark Kretschmann 2009-04-28 10:39:20 UTC
SVN commit 960296 by markey:

When "Stop Playing After This Track" is enabled, and Amarok stops after
reaching the end, disable the "Stop After.." state again.

I think this makes sense usability wise, and I seem to remember that it
worked like this in 1.x too.

Unfortunately it does not fix the problem with the wrong track count.

CCBUG: 188330

 M  +3 -0      PlaylistActions.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=960296
Comment 8 Seb Ruiz 2009-05-08 16:39:48 UTC
*** Bug 192037 has been marked as a duplicate of this bug. ***
Comment 9 Stefan Becker 2009-05-30 15:23:25 UTC
I have now encountered another problem:

 - create a playlist where each track has playcount == X and appears only ONCE.

 - start playing from the first track

 - set "stop playing after track" on the last track of the playlist

 - wait until Amarok has stopped playing

 - exit Amarok

 - start mysql and check the "playount" column in the statistics table for all tracks on the playlist


Here is what you'll see:

 - last track on the playlist has playcount == X+3 (Amarok 2.0) or X+2 (Amarok 2.1). This is the original bug I described above.

 - one or more tracks have playcount > X+1, which is incorrect.

 - all the other tracks have playcount == X+1, which is correct.

I think both problems have the same root cause, i.e. Amarok increases the playcount value more than once after a track has ended.
Comment 10 Stefan Becker 2009-06-19 16:40:04 UTC
Confirmed: bug still exists in release version of Amarok 2.1
Comment 11 m0nk 2009-06-24 01:17:31 UTC
This bug also appears at the end of the playlist. The last song gets +2 counts.
Amarok 2.1.1 and 2.2-svn.
Comment 12 jajaX 2009-07-11 00:18:17 UTC
hi !

same bugs on amarok 2.1 (ubuntu packakes) on kubuntu 9.04.
Comment 13 jajaX 2009-07-11 00:19:45 UTC
sorry it's amarok 2.1.1.
Comment 14 Myriam Schweingruber 2009-08-06 19:55:59 UTC
*** Bug 202837 has been marked as a duplicate of this bug. ***
Comment 15 Myriam Schweingruber 2009-08-16 11:41:35 UTC
*** Bug 204028 has been marked as a duplicate of this bug. ***
Comment 16 Edward Hades 2009-08-16 14:38:10 UTC
Fixed by commit a2dada018275cec3e749892f1d783ca49992b277
Author: Edward Hades <edward.hades@gmail.com>
Date:   Sun Aug 16 16:29:42 2009 +0400

    EngineController: removed excessive playcount increase.

    EngineController has been calling playbackFinished twice: in
    slotQueueEnded and slotAboutToFinish, so last track in the playback
    queue was getting playcount increased twice.

    BUG: 188330

 ChangeLog                |    1 +
 src/EngineController.cpp |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)



Please check if you can reproduce this bug after this commit, and if yes, tell me how, so i can fix it again ;)
Comment 17 Stefan Becker 2009-08-17 12:49:27 UTC
I backported the commit to the Fedora 11 amarok 2.1.1 RPM. I couldn't reproduce the problem anymore.
Comment 18 Myriam Schweingruber 2009-08-25 12:21:06 UTC
et status to resolved, then.