mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-28 09:38:31 +00:00
parser: live_now: Add fallback based on viewCount and isLive.
This commit is contained in:
parent
70acf7c8a3
commit
b2f7d07641
@ -249,6 +249,10 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
|||||||
|
|
||||||
live_now = microformat.dig?("liveBroadcastDetails", "isLiveNow")
|
live_now = microformat.dig?("liveBroadcastDetails", "isLiveNow")
|
||||||
.try &.as_bool
|
.try &.as_bool
|
||||||
|
if live_now.nil?
|
||||||
|
live_now = video_primary_renderer
|
||||||
|
.try &.dig?("viewCount", "videoViewCountRenderer", "isLive").try &.as_bool
|
||||||
|
end
|
||||||
live_now ||= video_details.dig?("isLive").try &.as_bool || false
|
live_now ||= video_details.dig?("isLive").try &.as_bool || false
|
||||||
|
|
||||||
post_live_dvr = video_details.dig?("isPostLiveDvr")
|
post_live_dvr = video_details.dig?("isPostLiveDvr")
|
||||||
|
Loading…
Reference in New Issue
Block a user