diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-12-15 13:02:53 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-12-15 13:02:53 -0600 |
| commit | 7d47b5d4bd4f690366fb26b47984b7ba9070c0de (patch) | |
| tree | 6d28048e2d6777b96854abf341ac9478808c6ed1 | |
| parent | d0b30ad977123a0afc83628782b339cfea28005b (diff) | |
| download | invidious-7d47b5d4bd4f690366fb26b47984b7ba9070c0de.tar.gz invidious-7d47b5d4bd4f690366fb26b47984b7ba9070c0de.tar.bz2 invidious-7d47b5d4bd4f690366fb26b47984b7ba9070c0de.zip | |
Use named params for SearchChannel
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 38 | ||||
| -rw-r--r-- | src/invidious/playlists.cr | 20 |
2 files changed, 29 insertions, 29 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index 8aebe669..94250a21 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -264,13 +264,13 @@ def extract_items(nodeset, ucid = nil) video_count ||= 0 items << SearchChannel.new( - author, - ucid, - author_thumbnail, - subscriber_count, - video_count, - description, - description_html + author: author, + ucid: ucid, + author_thumbnail: author_thumbnail, + subscriber_count: subscriber_count, + video_count: video_count, + description: description, + description_html: description_html ) else id = id.lchop("/watch?v=") @@ -324,18 +324,18 @@ def extract_items(nodeset, ucid = nil) end items << SearchVideo.new( - title, - id, - author, - author_id, - published, - view_count, - description, - description_html, - length_seconds, - live_now, - paid, - premium + title: title, + id: id, + author: author, + ucid: author_id, + published: published, + views: view_count, + description: description, + description_html: description_html, + length_seconds: length_seconds, + live_now: live_now, + paid: paid, + premium: premium ) end end diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index c1adb1d9..c8e44c1b 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -201,16 +201,16 @@ def fetch_playlist(plid) updated = decode_date(updated) playlist = Playlist.new( - title, - plid, - author, - author_thumbnail, - ucid, - description, - description_html, - video_count, - views, - updated + title: title, + id: plid, + author: author, + author_thumbnail: author_thumbnail, + ucid: ucid, + description: description, + description_html: description_html, + video_count: video_count, + views: views, + updated: updated ) return playlist |
