Skip to content

Commit

Permalink
Update src/invidious/routes/channels.cr sort_by for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
src-tinkerer committed Nov 30, 2023
1 parent 5f2b43d commit cf61af6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invidious/routes/channels.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf61af6

Please sign in to comment.