summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2019-08-05 14:19:02 -0500
committerOmar Roth <omarroth@protonmail.com>2019-08-05 18:57:32 -0500
commitcc956583fb70df1c1add33e977ef4ae8747ceffb (patch)
treeb4b45a6eef7fc91ed2cbe1b5570b5d688c747f16
parent14206efb091d0e62f8e42d221caab5cc0f17a9ea (diff)
downloadinvidious-cc956583fb70df1c1add33e977ef4ae8747ceffb.tar.gz
invidious-cc956583fb70df1c1add33e977ef4ae8747ceffb.tar.bz2
invidious-cc956583fb70df1c1add33e977ef4ae8747ceffb.zip
Fix detection of unavailable videos
-rw-r--r--src/invidious/videos.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index e1dff5aa..7d0c7838 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -1178,7 +1178,7 @@ def fetch_video(id, region)
end
end
- if info["errorcode"]?.try &.== "2" || !info["player_response"]
+ if !info["player_response"]? || info["errorcode"]?.try &.== "2"
raise "Video unavailable."
end