mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 06:06:48 -05:00
Fix live_now detection to not override false with nil via ||=
||= with false then nil resets live_now to nil in Crystal. Use explicit nil checks instead to preserve false values from microformat.isLiveNow for scheduled streams.
This commit is contained in:
parent
b80ac061b9
commit
24182a28d5
@ -282,8 +282,9 @@ If you are the administrator, install Invidious Companion: \
|
||||
|
||||
live_now = microformat.dig?("liveBroadcastDetails", "isLiveNow")
|
||||
.try &.as_bool
|
||||
live_now ||= video_details.dig?("isLive").try &.as_bool
|
||||
live_now ||= video_primary_renderer.try &.dig?("viewCount", "videoViewCountRenderer", "isLive").try &.as_bool || false
|
||||
live_now = video_details.dig?("isLive").try &.as_bool if live_now.nil?
|
||||
live_now = video_primary_renderer.try &.dig?("viewCount", "videoViewCountRenderer", "isLive").try &.as_bool if live_now.nil?
|
||||
live_now ||= false
|
||||
|
||||
post_live_dvr = video_details.dig?("isPostLiveDvr")
|
||||
.try &.as_bool || false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user