mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add fix for livestreams in search results
This commit is contained in:
parent
6bb747b579
commit
567b9f31f3
1 changed files with 7 additions and 2 deletions
|
@ -303,8 +303,13 @@ def extract_videos(nodeset, ucid = nil)
|
|||
published = Time.epoch(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
|
||||
else
|
||||
# Livestream
|
||||
view_count = metadata[0].content.delete("Streamed, watching").to_i64
|
||||
published = Time.now
|
||||
if metadata[0].content.starts_with? "Streamed "
|
||||
view_count = 0_i64
|
||||
published = decode_date(metadata[0].content.lchop("Streamed "))
|
||||
else
|
||||
view_count = metadata[0].content.delete(" watching,").to_i64
|
||||
published = Time.now
|
||||
end
|
||||
end
|
||||
else
|
||||
published = decode_date(metadata[0].content)
|
||||
|
|
Loading…
Reference in a new issue