Skip to content

Commit

Permalink
chore(jukebox): gracefully handle jukebox request when not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Nov 25, 2023
1 parent 82c3c5b commit def59f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/ctrlsubsonic/handlers_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ func (c *Controller) ServeGetRandomSongs(r *http.Request) *spec.Response {
var errNotATrack = errors.New("not a track")

func (c *Controller) ServeJukebox(r *http.Request) *spec.Response { // nolint:gocyclo
if c.jukebox == nil {
return spec.NewError(0, "jukebox not enabled")
}

params := r.Context().Value(CtxParams).(params.Params)
trackPaths := func(ids []specid.ID) ([]string, error) {
var paths []string
Expand Down

0 comments on commit def59f1

Please sign in to comment.