This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Feature Request - Collection Count and Sort

Tags: None
(comma "," separated)
manub686
Registered Member
Posts
5
Karma
0
Hi,

I explore the source code of Amarok-1.4.6 in order to add the following feature:

Can a column be added to the collection browser that displays the count of each collection entry, like

Metallica    155
The Who    183
Creed              1

and the collection be sortable on this column? Also, it would be nice to be able to collect all artists (or other collection entries) with fewer than N songs each into a single head, like "Incomplete Artists" or similar. This feature will be particularly useful when the collection is made up of full discographies of some artists, and only a few tracks of other artists. Adding a collection like "Rock hits" will pop up lot of sparse entries, making the collection list falsely long, and making it difficult to browse through the artists with comprehensive collections.

From what I understood, a table field for artist count needs to be added which can be populated on a collection scan, and UI modification is required only in collectionbrowser.h/cpp. Right click on an item does give a menu item like "Edit information for N tracks", but that N is computed at runtime by a count on the UI item and is not pulled up from db. It's very expensive to be used for the whole collection (about 10-12 mins on my P4 for 12k songs).

Please tell if I can help to add this feature, or if I should post somewhere else to request the same.

Thanks,

Manu.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS
FYI, Amarok 1.x is feature frozen (only bugfixes go in). All new development happens for Amarok 2.


--
Mark Kretschmann - Amarok Developer
manub686
Registered Member
Posts
5
Karma
0
I was not aware. Does his feature request translate to 2.x then?
qurk
Karma
0
If you right click on a collection browser entry, it will tell you how many tracks are below it in the tree, which is useful if you have a lot of very similar genres or something and are browsing by genre, but it works no matter how you sort your collection browser.  Maybe if your digging through the source look for that to see how it does that?
manub686
Registered Member
Posts
5
Karma
0
I've already said how it works, and why it's not useful for the whole collection - it's dynamic, and very slow. Also, I want to be able to see the counts for all of the items at one shot, and be able to sort on the count.
qurk
Karma
0
I realized that about 2 minutes after posting...so I read your first post again and realized you had meant exactly what you had said, instead of how I had comprehended it :/

Good idea!
manub686
Registered Member
Posts
5
Karma
0
But the question remains - does this count as a feature request for 2.x?
mdeamarok
Registered Member
Posts
1
Karma
0
Couldn't you do the following?

select a.name as artist,count(t.artist) as tracks
from artist a join tags t on a.id=t.artist
group by a.name order by count(t.artist)

Then you could stuff it in a script with:

dcop amarok collection select  . . . .

I have just started poking around amarok, so I'm not sure of all of the mechanics.  I'm also not well-versed in Ruby or SQL.

However, a quick command line test gave me the expected results, albeit with the artist name and track count on different lines.

HTH

Mark


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]