Bug 273407 - Total playlist length is shown incorrectly
Summary: Total playlist length is shown incorrectly
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.4.1
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 12:31 UTC by Daniel S.
Modified: 2011-07-25 10:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel S. 2011-05-16 12:31:53 UTC
Version:           2.4.1 (using KDE 4.6.2) 
OS:                Linux

I detected actually two issues regarding to total lenth computing, but they seem to be related, so I'm going to list both of them:

* Total length of a group and the whole playlist is shown wrong both in the status bar and in the playlist header. It is always computed modulo 24 hours, so the days count is omitted. According to https://bugs.kde.org/show_bug.cgi?id=267380 , I propose the format [day] h:min:sec.

* The total length in the status bar is not updated correctly. When adding a track to the playlist, it seems to work fine, but not when removing a track or use undo/redo or remove a track automatically in the dynamic mode.

Reproducible: Always

Steps to Reproduce:
- clear the playlist
- select a playlist view with grouping (by album e.g.), where the the group length is shown in the header
- put either a very long album in the playlist, or one album several times
-> notice that the total group length as well as the total length in the status bar is shown modulo 24 hours

- remove one track from the playlist
-> notice that the total length in the status bar is not updated
- remove another track
-> now the status bar is updated, but shows the old value
- play with undo/redo
-> sometimes updated correctly, sometimes not

Actual Results:  
wrong values :(

Expected Results:  
right values :)
Comment 1 Kevin Funk 2011-06-05 23:05:59 UTC

*** This bug has been marked as a duplicate of bug 267380 ***
Comment 2 Kevin Funk 2011-06-05 23:12:15 UTC
Actually, that was wrong.
Comment 3 Sam Lade 2011-07-25 00:24:36 UTC
Git commit 9cbd63a0c4aeff231e464e39dd5ff6d2685e49ee by Sam Lade.
Committed on 25/07/2011 at 01:18.
Pushed by lade into branch 'master'.

Display correct values for pretty times > 1 day

CCBUG:267380
CCBUG:273407

M  +9    -4    src/core/meta/support/MetaUtility.cpp

http://commits.kde.org/amarok/9cbd63a0c4aeff231e464e39dd5ff6d2685e49ee
Comment 4 Sam Lade 2011-07-25 00:24:36 UTC
Git commit de32e984ce2770f7e728cd4517b32c249cc80d8c by Sam Lade.
Committed on 25/07/2011 at 02:21.
Pushed by lade into branch 'master'.

Fix playlist length update on track removal

Update the playlist's length counter before calling endRemoveRows() rather than
after to ensure totalLength() returns the correct value.

BUG:273407
FIXED-IN:2.4.3

M  +3    -3    src/playlist/PlaylistModel.cpp

http://commits.kde.org/amarok/de32e984ce2770f7e728cd4517b32c249cc80d8c
Comment 5 Daniel S. 2011-07-25 10:06:35 UTC
I tested the latest Git snapshot and both issues are gone :)
Thank you!