Fix GetNowPlaying endpoint showing only the last play

This commit is contained in:
Deluan
2021-06-20 10:36:50 -04:00
parent f8ee6db72a
commit 97434c1789
12 changed files with 110 additions and 31 deletions
+5 -4
View File
@@ -99,10 +99,11 @@ func (api *Router) routes() http.Handler {
})
r.Group(func(r chi.Router) {
c := initMediaAnnotationController(api)
h(r, "setRating", c.SetRating)
h(r, "star", c.Star)
h(r, "unstar", c.Unstar)
h(r, "scrobble", c.Scrobble)
withPlayer := r.With(getPlayer(api.Players))
h(withPlayer, "setRating", c.SetRating)
h(withPlayer, "star", c.Star)
h(withPlayer, "unstar", c.Unstar)
h(withPlayer, "scrobble", c.Scrobble)
})
r.Group(func(r chi.Router) {
c := initPlaylistsController(api)