Skip to content

Commit

Permalink
fix(subsonic): allow unlimited bitrate with no transcode setting conf…
Browse files Browse the repository at this point in the history
…igured

fixes #485

Release-As: 0.16.4
  • Loading branch information
sentriz committed Mar 20, 2024
1 parent 62d49a3 commit 81f8a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/ctrlsubsonic/handlers_raw.go
Expand Up @@ -199,8 +199,8 @@ func (c *Controller) ServeStream(w http.ResponseWriter, r *http.Request) *spec.R
return spec.NewError(0, "couldn't find transcode preference: %v", err)
}
if pref == nil {
if maxBitRate > 0 {
return spec.NewError(0, "maxBitRate requested and no user transcode preferences found for user %q and client %q", user.Name, client)
if maxBitRate > 0 && maxBitRate < audioFile.AudioBitrate() {
return spec.NewError(0, "param maxBitRate requested and no user transcode preferences found for user %q and client %q. please configure transcode settings if you want to transcode", user.Name, client)
}
log.Printf("serving raw file, no user transcode preferences found for user %q and client %q", user.Name, client)
http.ServeFile(w, r, file.AbsPath())
Expand Down

0 comments on commit 81f8a7e

Please sign in to comment.