Skip to content

Commit a9dfc70

Browse files
committed
parser: Deal with missing lengthSeconds in video_details.
1 parent fe73551 commit a9dfc70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/invidious/videos/parser.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
217217
views_txt ||= video_details["viewCount"]?.try &.as_s || ""
218218
views = views_txt.gsub(/\D/, "").to_i64?
219219

220-
length_txt = (microformat["lengthSeconds"]? || video_details["lengthSeconds"])
220+
length_txt = (microformat["lengthSeconds"]? || video_details["lengthSeconds"]?)
221221
.try &.as_s.to_i64
222222

223223
published = microformat["publishDate"]?

0 commit comments

Comments
 (0)