Merge pull request #3903 from unixfox/temporary-message-video-not-available

This commit is contained in:
Émilien (perso) 2023-06-11 21:05:49 +02:00 committed by GitHub
commit 875b8ea0c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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