Add companion setup docs link for admins

This commit is contained in:
Emilien 2026-06-26 17:33:35 +02:00
parent f86bddd8b8
commit 77259ad42c
2 changed files with 4 additions and 2 deletions

View File

@ -318,7 +318,7 @@ def get_video(id, refresh = true, region = nil, force_refresh = false)
end end
else else
video = fetch_video(id, region) video = fetch_video(id, region)
Invidious::Database::Videos.insert(video) if !region && video.reason.nil? Invidious::Database::Videos.insert(video) if !region
end end
return video return video

View File

@ -76,7 +76,9 @@ module Invidious::Videos::Parser
params = self.parse_video_info(video_id, player_response) params = self.parse_video_info(video_id, player_response)
params["version"] = JSON::Any.new(Video::SCHEMA_VERSION.to_i64) params["version"] = JSON::Any.new(Video::SCHEMA_VERSION.to_i64)
params["reason"] = JSON::Any.new("Video unavailable") params["reason"] = JSON::Any.new("Video unavailable")
params["subreason"] = JSON::Any.new("Invidious Companion is not available. Video playback is not possible.") params["subreason"] = JSON::Any.new("Invidious Companion is not available. Video playback is not possible. \
If you are the administrator, install Invidious Companion: \
<a href=\"https://docs.invidious.io/installation/\">https://docs.invidious.io/installation/</a>")
return params return params
rescue ex rescue ex
LOGGER.debug("extract_video_info: parse from /next failed for #{video_id}: #{ex.message}") LOGGER.debug("extract_video_info: parse from /next failed for #{video_id}: #{ex.message}")