Version: 2.0.1 (using 4.1.3 (KDE 4.1.3), Kubuntu packages) Compiler: cc OS: Linux (i686) release 2.6.27-9-generic If your collection is sorted Genre / Artist / Year - Album, for instance, if you drag an artist into the playlist, it should enter your playlist in the same order displayed in the collection. Currently, it queues it up in alphabetical order. If you have your playlist sorted in descending order, it still queues it in ascending alphabetical order. Also, even if it was supposed to sort them alphabetically, it does not ignore "The" when queuing artists or albums (as oppose to the collection).
I think this is a good improvement
*** Bug 180745 has been marked as a duplicate of this bug. ***
Albums should be loaded in "Ascending" order in the playlist when loaded concurrently with other albums by the same artist. In other words, as per amarok 1.4.x they would be listed chronologically. In amarok 1.4.x, the albums were listed in descending order but loaded into the playlist in ascending order. This still seems to me to be the most logical approach.
(In reply to comment #3) > In other words, as per amarok 1.4.x they would be listed chronologically. > In amarok 1.4.x, the albums were listed in descending order but loaded into the > playlist in ascending order. > This still seems to me to be the most logical approach. So even if they are listed descending in the collection, they should be ascending in the playlist? That was indeed the functionality of 1.4.x, and I always considered that broken. If somebody has their collection sorted a certain way, I would assume that is the way in which they want to listen to their music. Now, there is of course the fact that the CollectionBrowser can't even sort by ascending chronological even if you wanted to. (Which could one day be fixed by 163781.)
Changing version.
This wish has been granted.This report should be removed.
Could you be more specific? Is it fixed in svn? I am using 2.5 and this has not changed at all Right clicking on an artist in my Collection Browser and choosing Replace Playlist loads them in alphabetic order, which really makes no sense at all since that is effectively random when you consider artists generally dont title their albums in alphabetic order. The bug was for albums not loading using the CollectionBrowser ordering pattern.
(In reply to comment #6) > This wish has been granted.This report should be removed. So sorry, please disregard this message, there was a misunderstanding with the Google Code-In student.
*** Bug 498394 has been marked as a duplicate of this bug. ***
Both "Add to playlist" and dragging items from collections (codepaths at CollectionTreeItemModelBase::mimeData( const QList<CollectionTreeItem*> &items ) and CollectionTreeView::playChildTracksSlot( Meta::TrackList list ) ) seem to use use std::stable_sort( tracks.begin(), tracks.end(), Meta::Track::lessThan ); to sort the tracks to be added. Meta::Track::lessThan compares first disc and track number if same album, then artist name alphabetically, then album name alphabetically. So instead of using that lessThan, some different comparison function that checks the current collection tree ordering would be required. Maybe I'll try implementing (sooner or later).
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/139
Testable code available at https://invent.kde.org/multimedia/amarok/-/merge_requests/139 - touches multiple things, so I'll keep it in branch for some time in case anyone should try out it from there already. Then maybe merge, and have in git master for a long enough time before next release to hopefully uncover any potential issues.
Git commit 5fce61ded823dcfdec3ed945fabb2c1a34146f50 by Tuomas Nurmi. Committed on 28/01/2025 at 16:57. Pushed by nurmi into branch 'master'. Try to preserve collection browser order when adding tracks to playlist Boilerplate in previous commit, actual sorting implementation in this one. Tries to emulate all the things that currently affect sorting in collection browser. Should handle most of them, but some corner cases remain. At least in cases where track has multiple labels, the sorting is not necessarily preserved, and this cannot be reasonably fixed. Some other fixable corner cases might be still uncovered, though. M +4 -0 ChangeLog M +8 -0 src/browsers/CollectionSortFilterProxyModel.cpp M +1 -0 src/browsers/CollectionSortFilterProxyModel.h M +53 -1 src/browsers/CollectionTreeItemModelBase.cpp https://invent.kde.org/multimedia/amarok/-/commit/5fce61ded823dcfdec3ed945fabb2c1a34146f50
Ok, noticed a bug in some cases after merging the code. Reverting drag-and-drop order preservation for now, will work out a better solution there. Right click -> add to playlist sorting works correctly, still.
Git commit 1c40077feee3d9b60ab450da383a175aed2b1ffe by Tuomas Nurmi. Committed on 28/01/2025 at 19:48. Pushed by nurmi into branch 'master'. Preserve track ordering also when drag-dropping from collection browser To achieve this, currentOrderTrackLessThan needs to be propagated quite a bit further so it can be used it when processing dropped track list in PlaylistModel.cpp. Maybe not the cleanest possible solution, but the required changes are not that extensive, except for testplaylistmodels, during whose compilation a bunch of related source files needed to be included. M +8 -1 src/browsers/CollectionTreeItemModelBase.cpp M +8 -0 src/browsers/CollectionTreeView.cpp M +3 -0 src/browsers/CollectionTreeView.h M +9 -1 src/playlist/PlaylistModel.cpp M +13 -0 tests/playlist/CMakeLists.txt https://invent.kde.org/multimedia/amarok/-/commit/1c40077feee3d9b60ab450da383a175aed2b1ffe
Looks good to me - thanks very much!