Bug 67598

Summary: Show Total running time of selection/playlist
Product: [Applications] juk Reporter: Davide Ferrari <vide80>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: CVS diff with the total time label

Description Davide Ferrari 2003-11-08 17:28:20 UTC
Version:            (using KDE KDE 3.1.93)
Installed from:    Compiled From Sources
OS:          Linux

Just please add a little label where you want (maybe in the toolbar) showing total running time of items selected (if I'm in Collection list) or of the selected playlist. It would be really useful to me (and others, I think)
Comment 1 Ismael Orenstein 2003-12-06 21:52:20 UTC
Created attachment 3585 [details]
CVS diff with the total time label

This adds a QLabel to the status bar, containing the total time of the entire
playlist. Whenever the count of the playlist changes, it emits a timeChanged
signal so that it is updated when itens are added/removed.
Comment 2 Davide Ferrari 2003-12-07 02:34:20 UTC
Thank you very much! :)
Comment 3 Teemu Rytilahti 2003-12-07 14:00:24 UTC
Thanks. It works well here except if you're using hierarchical playlist. On startup it shows the total playing time for whole playlist, but you can't see it anymore without restarting JuK again..
Comment 4 Ismael Orenstein 2003-12-07 18:35:46 UTC
With hierarchical playlist, it seems to work pretty well, as long as you don't add any new file to the collection list. If you do, the time for this new added file won't be displayed until you restart JuK.

If this is the behavior you got, I've got a fix right here:
- Edit playlist.cpp, line 460 and change "item->tag()->current()" to "item->tag()"
Comment 5 Scott Wheeler 2004-02-19 02:33:28 UTC
CVS commit by wheeler: 

Somewhat modified patch from Ismael Orenstein to add the total time in the
playlist to the status bar.

CCMAIL:67598-done@bugs.kde.org


  M +4 -1      juk.cpp   1.165
  M +13 -0     playlist.cpp   1.171
  M +5 -0      playlist.h   1.102
  M +3 -1      playlistsplitter.cpp   1.148
  M +5 -0      playlistsplitter.h   1.91
  M +32 -9     statuslabel.cpp   1.20 [POSSIBLY UNSAFE: printf]
  M +3 -1      statuslabel.h   1.12