mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-08 02:17:25 +02:00
refactor(transcoding): rename EnableTranscodingCancellation to Transcoding.EnableCancellation (#5523)
Move the option into the nested Transcoding config group alongside the limit knobs it interacts with, so all transcoding-related settings live together. The old top-level name is still honored via the existing mapDeprecatedOption / logDeprecatedOptions plumbing, which forwards the value to the new key and logs a deprecation warning at startup. The old struct field is removed (the new field is the single source of truth); the deprecated default is removed so viper.IsSet correctly distinguishes "user set the legacy option" from "no one set it."
This commit is contained in:
parent
945d0ba1e2
commit
823d851b75
2 changed files with 7 additions and 5 deletions
|
|
@ -248,10 +248,10 @@ func NewTranscodingCache() TranscodingCache {
|
|||
// the DoS the limiter is meant to prevent.
|
||||
//
|
||||
// When the limiter is disabled, preserve the legacy behavior
|
||||
// governed by EnableTranscodingCancellation so this PR does not
|
||||
// change observable behavior for operators who have not opted in.
|
||||
// governed by Transcoding.EnableCancellation so unchanged configs
|
||||
// keep their previous observable behavior.
|
||||
var transcodingCtx context.Context
|
||||
if job.ms.limiter.Enabled() || conf.Server.EnableTranscodingCancellation {
|
||||
if job.ms.limiter.Enabled() || conf.Server.Transcoding.EnableCancellation {
|
||||
transcodingCtx = ctx
|
||||
} else {
|
||||
transcodingCtx = request.AddValues(context.Background(), ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue