mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-20 23:46:26 -04:00
parser: Deal with missing lengthSeconds in video_details.
This commit is contained in:
parent
fe7355126a
commit
a9dfc70280
@ -217,7 +217,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
||||
views_txt ||= video_details["viewCount"]?.try &.as_s || ""
|
||||
views = views_txt.gsub(/\D/, "").to_i64?
|
||||
|
||||
length_txt = (microformat["lengthSeconds"]? || video_details["lengthSeconds"])
|
||||
length_txt = (microformat["lengthSeconds"]? || video_details["lengthSeconds"]?)
|
||||
.try &.as_s.to_i64
|
||||
|
||||
published = microformat["publishDate"]?
|
||||
|
Loading…
x
Reference in New Issue
Block a user