mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 06:06:48 -05:00
Fix missing channel name when falling back to /next-only data
Use extract_text() for author name from videoOwnerRenderer, which handles both 'simpleText' and 'runs' formats.
This commit is contained in:
parent
65e58e083c
commit
9ae7bb4ff6
@ -311,7 +311,6 @@ def get_video(id, refresh = true, region = nil, force_refresh = false)
|
||||
begin
|
||||
video = fetch_video(id, region)
|
||||
Invidious::Database::Videos.update(video) if CONFIG.invidious_companion.present?
|
||||
>>>>>>> 465a2cc6 (Skip caching entirely when Invidious Companion is not configured)
|
||||
rescue ex
|
||||
Invidious::Database::Videos.delete(id)
|
||||
raise ex
|
||||
@ -320,7 +319,6 @@ def get_video(id, refresh = true, region = nil, force_refresh = false)
|
||||
else
|
||||
video = fetch_video(id, region)
|
||||
Invidious::Database::Videos.insert(video) if !region && CONFIG.invidious_companion.present?
|
||||
>>>>>>> 465a2cc6 (Skip caching entirely when Invidious Companion is not configured)
|
||||
end
|
||||
|
||||
return video
|
||||
|
||||
@ -470,6 +470,9 @@ If you are the administrator, install Invidious Companion: \
|
||||
subs_text = author_info["subscriberCountText"]?
|
||||
.try { |t| t["simpleText"]? || t.dig?("runs", 0, "text") }
|
||||
.try &.as_s.split(" ", 2)[0]
|
||||
|
||||
author ||= extract_text(author_info.dig?("title"))
|
||||
ucid ||= author_info.dig?("title", "runs", 0, "navigationEndpoint", "browseEndpoint", "browseId").try &.as_s
|
||||
end
|
||||
|
||||
# Return data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user