Add GET /api/v1/statistics/soundtracks with every soundtrack and its songs
The other soundtrack statistics are capped at 100, so a client that shows every soundtrack (the MusicPlayer statistics tab) had no way to get them all. This one has no limit and is sorted by name.
This commit is contained in:
1 parent
fc7d787014
commit
080bacae80
9 files changed
+147
-1
No files matched your search
@@ -59,6 +59,11 @@ func (s *Server) registerStatistics(a apis) {
|
||||
songs("get-least-played-songs", "/songs/least-played", "Least played songs",
|
||||
"Returns the least played songs with their soundtrack.", st.LeastPlayedSongs)
|
||||
|
||||
register(s, a, op("get-all-soundtrack-statistics", "/soundtracks", "All soundtracks with statistics",
|
||||
"Returns every soundtrack with its songs and play counts, sorted by name."),
|
||||
func(ctx context.Context, _ *struct{}) (*jsonBody[[]backend.SoundtrackWithSongs], error) {
|
||||
return ok(st.AllSoundtracks(ctx))
|
||||
})
|
||||
register(s, a, op("get-never-played-soundtracks", "/soundtracks/never-played", "Never played soundtracks",
|
||||
"Returns all soundtracks that have never been played, with their songs."),
|
||||
func(ctx context.Context, _ *struct{}) (*jsonBody[[]backend.SoundtrackWithSongs], error) {
|
||||
|
||||
Reference in new issue
Block a user