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

Fix wrong mimetype being returned when transcoding #179

Closed pR0Ps closed 4 years ago

pR0Ps commented 4 years ago

Previously, when a client that was configured to always transcode requested a stream without specifying a format, the mimetype would not be set to the transcode target type.

This commit simplifies the logic that decides which format should be used and always sets the mimetype if the destination format doesn't match the source format.

codecov-io commented 4 years ago

Codecov Report

Merging #179 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #179      +/-   ##
==========================================
+ Coverage   88.29%   88.31%   +0.01%     
==========================================
  Files          33       33              
  Lines        3205     3209       +4     
==========================================
+ Hits         2830     2834       +4     
  Misses        375      375
Impacted Files Coverage Δ
supysonic/api/media.py 95.39% <100%> (+0.08%) :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 acb6b77...9462451. Read the comment docs.