From c8765385df16fff90cff82e1ed1e2056a4bc0ac3 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Thu, 14 Jul 2022 17:56:53 +0200 Subject: [PATCH] Fetch data from next endpoint for scheduled streams --- 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 19ee064c3..50bb80c1b 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -914,7 +914,7 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_ params["shortDescription"] = player_response.dig?("videoDetails", "shortDescription") || JSON::Any.new(nil) # Don't fetch the next endpoint if the video is unavailable. - if !params["reason"]? + if {"OK", "LIVE_STREAM_OFFLINE"}.any?(playability_status) next_response = YoutubeAPI.next({"videoId": video_id, "params": ""}) player_response = player_response.merge(next_response) end