mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-08 06:36:46 -05:00
fix length_seconds for channel videos
This commit is contained in:
parent
dc7a7e4e33
commit
ae1be83b43
@ -668,6 +668,10 @@ private module Parsers
|
|||||||
view_count = short_text_to_number(view_count_text || "0")
|
view_count = short_text_to_number(view_count_text || "0")
|
||||||
published = metadata_parts.dig?(1, "text", "content").try { |t| decode_date(t.as_s) } || Time.local
|
published = metadata_parts.dig?(1, "text", "content").try { |t| decode_date(t.as_s) } || Time.local
|
||||||
|
|
||||||
|
length = thumbnail_view_model.dig("overlays", 0, "thumbnailBottomOverlayViewModel", "badges", 0, "thumbnailBadgeViewModel", "text").try &.as_s
|
||||||
|
|
||||||
|
length_seconds = decode_length_seconds(length) if length
|
||||||
|
|
||||||
return SearchVideo.new({
|
return SearchVideo.new({
|
||||||
title: title,
|
title: title,
|
||||||
id: video_id,
|
id: video_id,
|
||||||
@ -676,7 +680,7 @@ private module Parsers
|
|||||||
published: published,
|
published: published,
|
||||||
views: view_count,
|
views: view_count,
|
||||||
description_html: "",
|
description_html: "",
|
||||||
length_seconds: 0,
|
length_seconds: length_seconds || 0,
|
||||||
premiere_timestamp: Time.unix(0),
|
premiere_timestamp: Time.unix(0),
|
||||||
author_verified: false,
|
author_verified: false,
|
||||||
author_thumbnail: nil,
|
author_thumbnail: nil,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user