Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort "All Songs" view alphabetically #166

Open
maniacgit opened this issue Sep 20, 2017 · 5 comments

Comments

@maniacgit
Copy link

commented Sep 20, 2017

I want to sort the tracks in the "All Songs" view alphabetically.

To achieve this I already tried to edit Slim/Menu/BrowseLibrary.pm at line 1638 and removed sort, set it to undef, created an own sort in the Queries.pm
But I've realized that this passthrough is never used (same with the url callback, tried to call an own function for alltracks there), all the passthrough options set there are not part of the link generated.

@mherger

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2017

Which "All Songs" menu?

@mherger mherger added the enhancement label Sep 21, 2017
@maniacgit

This comment has been minimized.

Copy link
Author

commented Sep 21, 2017

If you choose Artist or Album Artists, then all albums of this artist are displayed. At the end there is a "All Songs" selection.
The menu that is than opened should be sorted alphabetically.

@maniacgit

This comment has been minimized.

Copy link
Author

commented Sep 22, 2017

I made some more tests. It seems everything but name and icon is ignored in _albums in the $extra variable.

@michaelherger

This comment has been minimized.

Copy link

commented Sep 22, 2017

What did you try? You'd have to change the sort:albumtrack parameter to sort:title. And you'd have to do this in all places where the All Songs item is added. Please check the CLI documentation.

@maniacgit

This comment has been minimized.

Copy link
Author

commented Sep 22, 2017

Changing the sort:albumtrack was the first thing I've tried in sub _albums.
After this didn't worked I began to try to figur out why. Now I found that nearly nothing of those parameters seems to be used for rendering the following menu/generating the link.
$extra = [ { name => cstring($client, 'ALL_SONGS'), icon => 'html/images/albums.png', type => 'playlist', playlist => \&_tracks, url => \&_tracks, passthrough => [{ searchTags => \@searchTags, sort => 'sort:title', menuStyle => 'menuStyle:allSongs' }], itemActions => \%actions, } ];
I've made a test and changed them to non usefull values. The only things which had an effect was name (All Songs was renamed, also after clicking the link), and icon (no icon was displayed).
Changing the other variables hadn't an effect after all, nothing broke, nothing changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.