Skip to content

Commit

Permalink
Merge branch 'honor-max-bitrate' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
epoupon committed Jan 12, 2025
2 parents eda06c8 + cfacfcf commit 4a75e52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/subsonic/impl/endpoints/MediaRetrieval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,13 @@ namespace lms::api::subsonic
bitrate = maxBitRate;
}

// Need to transcode here
if (!requestedFormat)
requestedFormat = userTranscodeFormatToAvFormat(context.user->getSubsonicDefaultTranscodingOutputFormat());
if (!bitrate)
bitrate = std::min<std::size_t>(context.user->getSubsonicDefaultTranscodingOutputBitrate(), maxBitRate);
bitrate = context.user->getSubsonicDefaultTranscodingOutputBitrate();
if (maxBitRate)
bitrate = std::min<std::size_t>(bitrate, maxBitRate);

av::transcoding::OutputParameters& outputParameters{ parameters.outputParameters.emplace() };

Expand Down

0 comments on commit 4a75e52

Please sign in to comment.