add option to disable livestreams since they don't work right now
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled

This commit is contained in:
Fijxu 2025-03-29 02:50:19 -03:00
parent 56f309d6bb
commit 626fb2d1a8
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4
2 changed files with 6 additions and 0 deletions

View File

@ -241,6 +241,8 @@ class Config
property force_local : Bool = true
property disable_livestreams : Bool = true
{% if flag?(:linux) %}
property reload_config_automatically : Bool = true
{% end %}

View File

@ -61,6 +61,10 @@ module Invidious::Routes::Watch
return error_template(500, ex)
end
if video.live_now && CONFIG.disable_livestreams
return error_template(403, "Livestreams are disabled as they are not working with invidious-companion right now. Please wait until an update comes out!")
end
if preferences.annotations_subscribed &&
subscriptions.includes?(video.ucid) &&
(env.params.query["iv_load_policy"]? || "1") == "1"