From cc956583fb70df1c1add33e977ef4ae8747ceffb Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 5 Aug 2019 14:19:02 -0500 Subject: [PATCH] Fix detection of unavailable videos --- src/invidious/videos.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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