Update src/invidious/routes/channels.cr sort_by for consistency

This commit is contained in:
src-tinkerer 2023-11-30 14:34:01 +03:30
parent 5f2b43d653
commit cf61af67ab

View File

@ -81,12 +81,12 @@ module Invidious::Routes::Channels
return env.redirect "/channel/#{channel.ucid}"
end
sort_by = env.params.query["sort_by"]?.try &.downcase
sort_by = env.params.query["sort_by"]?.try &.downcase || "newest"
sort_options = {"newest", "oldest", "popular"}
# Fetch items and continuation token
items, next_continuation = Channel::Tabs.get_60_livestreams(
channel, continuation: continuation, sort_by: (sort_by || "newest")
channel, continuation: continuation, sort_by: sort_by
)
selected_tab = Frontend::ChannelPage::TabsAvailable::Streams