Bug 182025

Summary: songs get counted twice
Product: [Applications] amarok Reporter: Christian Hartmann <chris-hartmann>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: myriam
Priority: NOR    
Version: 2.0.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christian Hartmann 2009-01-26 21:51:53 UTC
Version:           2.0.1 (using KDE 4.1.96)
OS:                Linux
Installed from:    SuSE RPMs

When I play a song, it gets counted when playing starts and another time when playing is over.
Comment 1 Myriam Schweingruber 2009-01-30 22:45:08 UTC
Reproducable, playcount gets incremented at the very beginning and at the end. Souldn't that be only if it has been played more than 50% of the lenght?
Comment 2 Dan Meltzer 2009-02-01 18:22:27 UTC
SVN commit 919847 by dmeltzer:

Fix calculation of statistics.

Calculating statistics in slotNewTrackPlaying is a bad idea because trackPosition() is undefined in that case.  Instead we should calculate it in PlaylistActions before we start playing the next track.  Will backport this after it gets more testing (Especially on windows/mac)
BUG: 182025

 M  +1 -0      ChangeLog  
 M  +12 -23    src/EngineController.cpp  
 M  +13 -0     src/playlist/PlaylistActions.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=919847
Comment 3 Dan Meltzer 2009-02-01 21:56:46 UTC
SVN commit 919914 by dmeltzer:

Backport r919847

Fix statistics calculations
BUG: 182025

 M  +1 -0      ChangeLog  
 M  +12 -23    src/EngineController.cpp  
 M  +13 -0     src/playlist/PlaylistActions.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=919914