spl0k / supysonic

Supysonic is a Python implementation of the Subsonic server API.
https://supysonic.readthedocs.io
GNU Affero General Public License v3.0
260 stars 57 forks source link

Add default_transcode_target option #168

Closed mvn23 closed 4 years ago

mvn23 commented 4 years ago

Add a default_transcode_target option to the transcoding section of the config. The value of this option will be used as target format when a client requests a bitrate lower than the original file with no target format.

I found that DSub was eating my mobile data when streaming flac files, even though it is configured to limit bitrate to 256k on mobile. Turns out that in this configuration, DSub only requests a bitrate without any target format. As a result, the whole flac file was returned.

codecov-io commented 4 years ago

Codecov Report

Merging #168 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
+ Coverage   90.69%   90.69%   +<.01%     
==========================================
  Files          33       33              
  Lines        2987     2989       +2     
==========================================
+ Hits         2709     2711       +2     
  Misses        278      278
Impacted Files Coverage Δ
supysonic/api/media.py 94.02% <100%> (+0.06%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2e320cc...f0525dc. Read the comment docs.