Fix missing author name for channel_videos

このコミットが含まれているのは:
Omar Roth 2019-04-12 16:29:23 -05:00
コミット ce2a3361eb
2個のファイルの変更4行の追加8行の削除

ファイルの表示

@ -114,9 +114,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
if auto_generated
videos = 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)
end
end
@ -184,9 +182,7 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
if auto_generated
videos = 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)
end
count = nodeset.size

ファイルの表示

@ -179,8 +179,8 @@ def html_to_content(description_html)
return description_html, description
end
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