summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉmilien (perso) <4016501+unixfox@users.noreply.github.com>2023-06-11 21:05:49 +0200
committerGitHub <noreply@github.com>2023-06-11 21:05:49 +0200
commit875b8ea0c2f1edf4d231c1e939fd75758fad481d (patch)
tree5bf5c0e22fa65c4ad403f6c100ba2974a6f118b8
parentc3a3f98014d3569ff08ceac8aca137f58f567227 (diff)
parent8e4833d21a08b9a25cd15738a399c64bc5575fa6 (diff)
downloadinvidious-875b8ea0c2f1edf4d231c1e939fd75758fad481d.tar.gz
invidious-875b8ea0c2f1edf4d231c1e939fd75758fad481d.tar.bz2
invidious-875b8ea0c2f1edf4d231c1e939fd75758fad481d.zip
Merge pull request #3903 from unixfox/temporary-message-video-not-available
-rw-r--r--src/invidious/videos/parser.cr6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr
index 2e8eecc3..9cc0ffdc 100644
--- a/src/invidious/videos/parser.cr
+++ b/src/invidious/videos/parser.cr
@@ -78,7 +78,11 @@ def extract_video_info(video_id : String, proxy_region : String? = nil)
elsif video_id != player_response.dig("videoDetails", "videoId")
# YouTube may return a different video player response than expected.
# See: https://github.com/TeamNewPipe/NewPipe/issues/8713
- raise VideoNotAvailableException.new("The video returned by YouTube isn't the requested one. (WEB client)")
+ # Line to be reverted if one day we solve the video not available issue.
+ return {
+ "version" => JSON::Any.new(Video::SCHEMA_VERSION.to_i64),
+ "reason" => JSON::Any.new("Can't load the video on this Invidious instance. YouTube is currently trying to block Invidious instances. <a href=\"https://github.com/iv-org/invidious/issues/3822\">Click here for more info about the issue.</a>"),
+ }
else
reason = nil
end