owntone-server icon indicating copy to clipboard operation
owntone-server copied to clipboard

[web] feature request - extending the `sort by` filters

Open whatdoineed2do opened this issue 2 years ago • 1 comments

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

whatdoineed2do avatar May 14 '22 19:05 whatdoineed2do

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())

chme avatar May 15 '22 07:05 chme

@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

hacketiwack avatar Mar 24 '23 10:03 hacketiwack

Feature merged into master branch.

hacketiwack avatar Apr 05 '23 19:04 hacketiwack