diff --git a/src/invidious/channels/about.cr b/src/invidious/channels/about.cr index 8301ca43..8a03c419 100644 --- a/src/invidious/channels/about.cr +++ b/src/invidious/channels/about.cr @@ -59,7 +59,8 @@ def get_about_info(ucid, locale) : AboutChannel # ex: https://www.youtube.com/channel/UCQvWX73GQygcwXOTSf_VDVg/ description_node = description_base_node.dig?("simpleText") || description_base_node - tags = initdata.dig?("header", "interactiveTabbedHeaderRenderer", "badges").try &.as_a.map(&.["metadataBadgeRenderer"]["label"].as_s) || [] of String + tags = initdata.dig?("header", "interactiveTabbedHeaderRenderer", "badges") + .try &.as_a.map(&.["metadataBadgeRenderer"]["label"].as_s) || [] of String else author = initdata["metadata"]["channelMetadataRenderer"]["title"].as_s author_url = initdata["metadata"]["channelMetadataRenderer"]["channelUrl"].as_s diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index 087d9c92..d006985e 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -102,12 +102,12 @@ module Invidious::Routes::Channels if channel.auto_generated sort_options = {"albums_and_singles", "created_playlists"} - sort_by = env.params.query["sort_by"]?.try &.downcase || sort_options[0] else sort_options = {"last", "oldest", "newest"} - sort_by = env.params.query["sort_by"]?.try &.downcase || sort_options[0] end + sort_by = env.params.query["sort_by"]?.try &.downcase || sort_options[0] + items, next_continuation = fetch_channel_playlists( channel.ucid, channel.author, continuation, (sort_by) )