mirror of
https://github.com/iv-org/invidious.git
synced 2026-08-17 05:20:51 -05:00
Fix missing channel links for multi-creator related videos
This commit is contained in:
parent
8fde720f94
commit
6ecbbd2b6a
@ -19,14 +19,22 @@ module Invidious::Videos::Parser
|
|||||||
decode_length_seconds(box.as_s).to_s
|
decode_length_seconds(box.as_s).to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
# Both have "short", so the "long" option shouldn't be required
|
byline = related["shortBylineText"]? || related["longBylineText"]?
|
||||||
channel_info = (related["shortBylineText"]? || related["longBylineText"]?)
|
|
||||||
.try &.dig?("runs", 0)
|
|
||||||
|
|
||||||
author = channel_info.try &.dig?("text")
|
author = extract_text(byline)
|
||||||
author_verified = has_verified_badge?(related["ownerBadges"]?).to_s
|
author_verified = has_verified_badge?(related["ownerBadges"]?).to_s
|
||||||
|
|
||||||
ucid = channel_info.try { |ci| HelperExtractors.get_browse_id(ci) }
|
ucid = nil
|
||||||
|
runs = byline.try &.dig?("runs")
|
||||||
|
if runs && runs.as_a?
|
||||||
|
runs.as_a.each do |run|
|
||||||
|
id = HelperExtractors.get_browse_id(run)
|
||||||
|
if id && !id.to_s.empty?
|
||||||
|
ucid = id
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
short_view_count = related.try do |r|
|
short_view_count = related.try do |r|
|
||||||
HelperExtractors.get_short_view_count(r).to_s
|
HelperExtractors.get_short_view_count(r).to_s
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user