Use named params for SearchChannel
This commit is contained in:
parent
d0b30ad977
commit
7d47b5d4bd
2 changed files with 29 additions and 29 deletions
|
@ -264,13 +264,13 @@ def extract_items(nodeset, ucid = nil)
|
||||||
video_count ||= 0
|
video_count ||= 0
|
||||||
|
|
||||||
items << SearchChannel.new(
|
items << SearchChannel.new(
|
||||||
author,
|
author: author,
|
||||||
ucid,
|
ucid: ucid,
|
||||||
author_thumbnail,
|
author_thumbnail: author_thumbnail,
|
||||||
subscriber_count,
|
subscriber_count: subscriber_count,
|
||||||
video_count,
|
video_count: video_count,
|
||||||
description,
|
description: description,
|
||||||
description_html
|
description_html: description_html
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
id = id.lchop("/watch?v=")
|
id = id.lchop("/watch?v=")
|
||||||
|
@ -324,18 +324,18 @@ def extract_items(nodeset, ucid = nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
items << SearchVideo.new(
|
items << SearchVideo.new(
|
||||||
title,
|
title: title,
|
||||||
id,
|
id: id,
|
||||||
author,
|
author: author,
|
||||||
author_id,
|
ucid: author_id,
|
||||||
published,
|
published: published,
|
||||||
view_count,
|
views: view_count,
|
||||||
description,
|
description: description,
|
||||||
description_html,
|
description_html: description_html,
|
||||||
length_seconds,
|
length_seconds: length_seconds,
|
||||||
live_now,
|
live_now: live_now,
|
||||||
paid,
|
paid: paid,
|
||||||
premium
|
premium: premium
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -201,16 +201,16 @@ def fetch_playlist(plid)
|
||||||
updated = decode_date(updated)
|
updated = decode_date(updated)
|
||||||
|
|
||||||
playlist = Playlist.new(
|
playlist = Playlist.new(
|
||||||
title,
|
title: title,
|
||||||
plid,
|
id: plid,
|
||||||
author,
|
author: author,
|
||||||
author_thumbnail,
|
author_thumbnail: author_thumbnail,
|
||||||
ucid,
|
ucid: ucid,
|
||||||
description,
|
description: description,
|
||||||
description_html,
|
description_html: description_html,
|
||||||
video_count,
|
video_count: video_count,
|
||||||
views,
|
views: views,
|
||||||
updated
|
updated: updated
|
||||||
)
|
)
|
||||||
|
|
||||||
return playlist
|
return playlist
|
||||||
|
|
Loading…
Reference in a new issue