Skip to content

Commit

Permalink
Support raw format in Subsonic API
Browse files Browse the repository at this point in the history
Some clients such as Volusonic use the `raw` format. In this case,
simply return the file.
  • Loading branch information
DocMarty84 committed Apr 22, 2020
1 parent 8ba14ff commit 2d46b0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/subsonic/media_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def stream(self, **kwargs):

# As specified in Subsonic API: if maxBitRate is set to zero, no limit is imposed. We also
# avoid any upsampling.
if fn_ext[1:] == output_format and (not maxBitRate or maxBitRate >= track.bitrate):
if output_format == "raw" or (
fn_ext[1:] == output_format and (not maxBitRate or maxBitRate >= track.bitrate)
):
return http.send_file(track.path)

Transcoder = (
Expand Down

0 comments on commit 2d46b0e

Please sign in to comment.