Bug 281143 - Length of filtered playlist is not calculated - total playlist length displayed
Summary: Length of filtered playlist is not calculated - total playlist length displayed
Status: CONFIRMED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.8.0
Platform: Fedora RPMs Linux
: LO normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 313971 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-01 00:44 UTC by eugen.dahm
Modified: 2014-08-12 08:53 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot, showing the faulty behaviour (26.15 KB, image/jpeg)
2011-09-01 00:44 UTC, eugen.dahm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eugen.dahm 2011-09-01 00:44:02 UTC
Created attachment 63278 [details]
screenshot, showing the faulty behaviour

Version:           2.4.3 (using KDE 4.6.5) 
OS:                Linux

This is not about bug 273407 or 267380, it's different but also, maybe related.
In earlier versions (don't know since when it's b0rked), the total playlist length was calculated with respect to the search filter.
Since the last few versions, it always displays the total length of all songs in the playlist.
ATM, I have 50 active songs because of the search filter, and the bar tells me, 
the total length is 17 days, 1h, 11min, which is more or less the total length of my collection.
ps: number of songs is updated after selecting a song (not dynamically, while entering something in the search bar - this was the original behaviour in previous versions).

Reproducible: Always

Steps to Reproduce:
- open a playlist with a fair number of songs
- enter something into the search filter

Actual Results:  
the total length of all songs(including the filtered) in the playlist is displayed.

Expected Results:  
total length of the songs that match the filter
Comment 1 Shlomi Fish 2011-09-02 16:22:30 UTC
Can confirm here - Amarok 2.4.3 on KDE-4.7.0 on Mageia Linux 2 (cauldron).
Comment 2 Myriam Schweingruber 2011-09-02 19:23:54 UTC
Setting status to confirmed.
Comment 3 eugen.dahm 2012-01-04 12:10:16 UTC
> Target: 	2.5
Ok, 2.5 was released and it's NOT fixed.  :(.
Comment 4 Myriam Schweingruber 2012-01-04 23:47:30 UTC
Thank you for the feedback.
Comment 5 eugen.dahm 2012-01-10 09:54:44 UTC
Np :). This bug annoys the hell out of me, but unfortunately, the code base is too big to fix this for myself :/.
Comment 6 eugen.dahm 2012-08-15 11:11:43 UTC
Again. Target 2.6 .. missed. Gaaawd. It's now 11!!! months since I submitted this bug report. Could someone pleeeeease be so kind to fix this damn bug. It's not like this should be a hard to track down bug. Would it change something if I donated some money? Does it always take over a year to fix a bug?
Comment 7 Myriam Schweingruber 2012-08-16 23:10:10 UTC
(In reply to comment #6)
> Again. Target 2.6 .. missed. Gaaawd. It's now 11!!! months since I submitted
> this bug report. Could someone pleeeeease be so kind to fix this damn bug.
> It's not like this should be a hard to track down bug. Would it change
> something if I donated some money? Does it always take over a year to fix a
> bug?

Please calm down, it's is just a matter of available resources, there were far bigger priorities to solve with the small group of developers we have and the limited time they have available for working on Free Software.
Comment 8 Matěj Laitl 2013-05-28 18:27:06 UTC
I was thinking about this and came to conclusion that the length and size should be calculated in the view, not in the model. Thanks to beginRemoveRows() we can use the same trick not to recount the length all the time. (this is rather a note to myself)
Comment 9 eugen.dahm 2013-05-29 10:22:01 UTC
(In reply to comment #8)
> I was thinking about this and came to conclusion that the length and size
> should be calculated in the view, not in the model. Thanks to
> beginRemoveRows() we can use the same trick not to recount the length all
> the time. (this is rather a note to myself)
Sorry, but this sounds rather ugly. I don't know if there is, but suppose there is a command line interface /ncurses / whatever alternative interface to amarok. To display the dinamically updated playlist length, you would have to reimplement this functionality in the alternative interface unnecessarily. i don't believe this was the original idea of MVC.
Comment 10 Matěj Laitl 2013-05-29 10:35:48 UTC
(In reply to comment #9)
> Sorry, but this sounds rather ugly. I don't know if there is, but suppose
> there is a command line interface /ncurses / whatever alternative interface
> to amarok. To display the dinamically updated playlist length, you would
> have to reimplement this functionality in the alternative interface
> unnecessarily. i don't believe this was the original idea of MVC.

The problem with MVC in Qt is that there is no MVC, there is MV, the functionality of Controller being merged to View. But since you're able to advise developers how to fix this, you'll be able to fix this yourself! Please read http://community.kde.org/Amarok/Development/Join on how to start with Amarok development, then submit a patch to http://reviewboard.kde.org/ Thanks!
Comment 11 Oskar Jauch 2013-12-03 13:12:55 UTC
Still reproducible with Amarok 2.8
Comment 12 applxperience 2014-04-16 04:43:04 UTC
I may have tested this script time ago and not sure if it's deployed in my website, but searching in my computer for scripts containing a common typo I use to write, I found your script having "lenght" instead of "length", in a line apparently counting the items in a playlist, in a file named mw.PlayList.js (part of mwEmbed library) https://github.com/kaltura/mwEmbed
Comment 13 Myriam Schweingruber 2014-08-12 08:53:49 UTC
*** Bug 313971 has been marked as a duplicate of this bug. ***