mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-02 03:31:20 +05:30
Fix missing author name for channel_videos
This commit is contained in:
parent
ca9ea109c6
commit
ce2a3361eb
@ -114,9 +114,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
|
|||||||
if auto_generated
|
if auto_generated
|
||||||
videos = extract_videos(nodeset)
|
videos = extract_videos(nodeset)
|
||||||
else
|
else
|
||||||
videos = extract_videos(nodeset, ucid)
|
videos = extract_videos(nodeset, ucid, author)
|
||||||
videos.each { |video| video.ucid = ucid }
|
|
||||||
videos.each { |video| video.author = author }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -184,9 +182,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
|
|||||||
if auto_generated
|
if auto_generated
|
||||||
videos = extract_videos(nodeset)
|
videos = extract_videos(nodeset)
|
||||||
else
|
else
|
||||||
videos = extract_videos(nodeset, ucid)
|
videos = extract_videos(nodeset, ucid, author)
|
||||||
videos.each { |video| video.ucid = ucid }
|
|
||||||
videos.each { |video| video.author = author }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
count = nodeset.size
|
count = nodeset.size
|
||||||
|
@ -179,8 +179,8 @@ def html_to_content(description_html)
|
|||||||
return description_html, description
|
return description_html, description
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_videos(nodeset, ucid = nil)
|
def extract_videos(nodeset, ucid = nil, author_name = nil)
|
||||||
videos = extract_items(nodeset, ucid)
|
videos = extract_items(nodeset, ucid, author_name)
|
||||||
videos.select! { |item| !item.is_a?(SearchChannel | SearchPlaylist) }
|
videos.select! { |item| !item.is_a?(SearchChannel | SearchPlaylist) }
|
||||||
videos.map { |video| video.as(SearchVideo) }
|
videos.map { |video| video.as(SearchVideo) }
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user