Invidious is an alternative front-end to YouTube
Fix missing author name for channel_videos
Omar Rothce2a3361eb90
diff --git a/src/invidious/channels.cr b/src/invidious/channels.crindex 0eeb8a8b..9339d197 100644--- a/src/invidious/channels.cr+++ b/src/invidious/channels.cr@@ -114,9 +114,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)if auto_generatedvideos = extract_videos(nodeset)else- videos = extract_videos(nodeset, ucid)- videos.each { |video| video.ucid = ucid }- videos.each { |video| video.author = author }+ videos = extract_videos(nodeset, ucid, author)endend@@ -184,9 +182,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)if auto_generatedvideos = extract_videos(nodeset)else- videos = extract_videos(nodeset, ucid)- videos.each { |video| video.ucid = ucid }- videos.each { |video| video.author = author }+ videos = extract_videos(nodeset, ucid, author)endcount = nodeset.sizediff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.crindex d62e7ba6..574f1184 100644--- a/src/invidious/helpers/helpers.cr+++ b/src/invidious/helpers/helpers.cr@@ -179,8 +179,8 @@ def html_to_content(description_html)return description_html, descriptionend-def extract_videos(nodeset, ucid = nil)- videos = extract_items(nodeset, ucid)+def extract_videos(nodeset, ucid = nil, author_name = nil)+ videos = extract_items(nodeset, ucid, author_name)videos.select! { |item| !item.is_a?(SearchChannel | SearchPlaylist) }videos.map { |video| video.as(SearchVideo) }end