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
Open

Sort "All Songs" view alphabetically #166

maniacgit opened this issue Sep 20, 2017 · 5 comments

Comments

@maniacgit
Copy link

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
Copy link
Contributor

mherger commented Sep 21, 2017

Which "All Songs" menu?

@maniacgit
Copy link
Author

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
Copy link
Author

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

@michaelherger
Copy link
Member

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
Copy link
Author

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
Development

No branches or pull requests

3 participants