diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index 961d7b31..2cf8a725 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -190,7 +190,7 @@ module Invidious::Routes::Watch captions: video.captions ) - if (CONFIG.invidious_companion && env.params.query["local"] == true) + if (CONFIG.invidious_companion && (preferences.local || preferences.quality == "dash")) env.response.headers["Content-Security-Policy"] = env.response.headers["Content-Security-Policy"] .gsub("media-src", "media-src " + video.invidious_companion["baseUrl"].as_s)