-
-
Notifications
You must be signed in to change notification settings - Fork 793
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
Add a 'shuffle all' button for songs in webUI #256
Comments
Thanks for taking a stab at this. My concern with this approach is the issue you already observed: It does not scale. My library for example has ~40K songs, and we have some users with more than 170K songs!!!! I would implement this in a way similar to what Jamstash and DSub do: Have an option to generate a random playlist, where you can limit the size (no more than 1000), and even add some filters. This could be a dialog box in the Songs view, or part of the upcoming Playlist management feature. Regarding your implementation, it is really good, specially for a first timer. The only thing I would change (not considering the whole "not-scaleable" approach) is to move the shuffling to an action, so instead of dispatching |
Hey @stncrn, what do you think about adding an option to the Let me know your thoughts about this, it would be pretty straightforward to implement this endpoint |
I already implemented the option in the dataProvider
.getList('song', {
pagination: { page: 1, perPage: 1000 },
sort: { field: 'random', order: 'ASC' },
filter: { },
}) Keep in mind that there is no default limit for the Feel free to experiment with this. |
Sorry, hadn't have a lot a free time recently. You're definitely right, 1000 songs are more than enough. I didn't know that dSub was only creating a partial playlist when using the random button. Great to see that you advanced on adding a random selection method on the song provider! I definitely did not thought it would be as simple. I'll try to use it this weekend, and make the "shuffle (almost-)all" button finally usable. |
Can something similar be added for the album view? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I often like to listen to my whole music library, in random order.
Doing so with the current song page is almost impossible. The bulk action is only applied to the selected elements of the current page of the song list. So you have to select all on the first page, add to queue, go to the second page, repeat...
I already tried to implement the feature. The steps were:
action
in the list. This button uses theexporter
feature of the list, to be able to access all records, and not only the displayed (ids
) or selected (selectedIds
) ones.addTracks
, that mimicsaddTrack
: I had to do this to limit the number of calls to thedispatch
functionclearQueue
: very basic, to clear the queue only once, before adding all the songs in itThe current commit is here: stncrn@0ea60b7
However, it is not ready for a pull request:
https://vimeo.com/413592965
It would be very great to have this feature added in Navidrome, and I hope that this preliminary work will help.
The text was updated successfully, but these errors were encountered: