Invidious is an alternative front-end to YouTube
Add live now indicator to playlists
Omar Rotha3b767bb1337
diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.crindex 9f844ce6..88308686 100644--- a/src/invidious/playlists.cr+++ b/src/invidious/playlists.cr@@ -8,6 +8,7 @@ class PlaylistVideopublished: Time,playlists: Array(String),index: Int32,+ live_now: Bool,})end@@ -101,8 +102,10 @@ def extract_playlist(plid, nodeset, index)anchor = video.xpath_node(%q(.//td[@class="pl-video-time"]/div/div[1]))if anchor && !anchor.content.empty?length_seconds = decode_length_seconds(anchor.content)+ live_now = falseelselength_seconds = 0+ live_now = trueendvideos << PlaylistVideo.new(@@ -114,6 +117,7 @@ def extract_playlist(plid, nodeset, index)published: Time.now,playlists: [plid],index: index + offset,+ live_now: live_now)end