feat(subsonic): change frequent album list to use total time played per album instead of play count. (#331)

Co-authored-by: Brian Doherty <brian@mediaserver.dohertyfamily.me>
This commit is contained in:
brian-doherty
2023-06-29 16:11:15 -05:00
committed by GitHub
parent cbab68b057
commit 7982ffc0b4
6 changed files with 26 additions and 7 deletions

View File

@@ -150,7 +150,7 @@ func (c *Controller) ServeGetAlbumList(r *http.Request) *spec.Response {
JOIN plays
ON albums.id=plays.album_id AND plays.user_id=?`,
user.ID)
q = q.Order("plays.count DESC")
q = q.Order("plays.length DESC")
case "newest":
q = q.Order("created_at DESC")
case "random":