owntone-server
owntone-server copied to clipboard
[web] feature request - extending the `sort by` filters
On the pages that displays tracks, it would be good to be able to sort based on rating
.
I took a look at the GroupByList
but need to figure out the groupKeyFn
to make this work. If @chme has something like this in the works i'll take a look
I am currently not working on something like this, feel free to look into it.
To get you started, this might help: https://github.com/chme/forked-daapd/tree/web/group-sort-rating
It adds a group by rating function to GroupByList.js
(I did not test if it actually works :-).
To group/sort by it something like the following should work:
const list = new GroupByList(response.data)
list.group(byRating())
@whatdoineed2do, can you please check if the way I implemented the feature is what you expected? Also, @chme I took the opportunity to streamline the usage of GroupByList. Thanks
Feature merged into master branch.