mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-01 12:54:35 -04:00
Count when YouTube returns wrong video as failure
This commit is contained in:
parent
9294d26040
commit
aa5f0a49f1
1 changed files with 5 additions and 0 deletions
|
@ -78,6 +78,11 @@ def extract_video_info(video_id : String, proxy_region : String? = nil)
|
|||
# YouTube may return a different video player response than expected.
|
||||
# See: https://github.com/TeamNewPipe/NewPipe/issues/8713
|
||||
# Line to be reverted if one day we solve the video not available issue.
|
||||
|
||||
# Although technically not a call to /videoplayback the fact that YouTube is returning the
|
||||
# wrong video means that we should count it as a failure.
|
||||
get_playback_statistic().as(Hash(String, Int64 | Float64))["totalRequests"] += 1
|
||||
|
||||
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>"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue