Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(subsonic): return an error when no tracks provided in savePlayQueue
  • Loading branch information
sentriz committed Oct 8, 2022
1 parent 8ee357b commit d47d5e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/ctrlsubsonic/handlers_common.go
Expand Up @@ -169,6 +169,9 @@ func (c *Controller) ServeSavePlayQueue(r *http.Request) *spec.Response {
trackIDs = append(trackIDs, id.Value)
}
}
if len(trackIDs) == 0 {
return spec.NewError(10, "no track ids provided")
}
user := r.Context().Value(CtxUser).(*db.User)
var queue db.PlayQueue
c.DB.Where("user_id=?", user.ID).First(&queue)
Expand Down

0 comments on commit d47d5e1

Please sign in to comment.