mirror of
https://github.com/iv-org/invidious.git
synced 2025-09-14 17:51:34 -04:00
parser: live_now: Add fallback based on viewCount and isLive.
This commit is contained in:
parent
70acf7c8a3
commit
b2f7d07641
1 changed files with 4 additions and 0 deletions
|
@ -249,6 +249,10 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
|||
|
||||
live_now = microformat.dig?("liveBroadcastDetails", "isLiveNow")
|
||||
.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
|
||||
|
||||
post_live_dvr = video_details.dig?("isPostLiveDvr")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue