Fix detection of unavailable videos

This commit is contained in:
Omar Roth
2019-08-05 14:19:02 -05:00
parent 14206efb09
commit cc956583fb

View File

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