Channels: Add sort options to shorts
All checks were successful
Invidious CI / build (push) Successful in 5m7s
All checks were successful
Invidious CI / build (push) Successful in 5m7s
Signed-off-by: Fijxu <fijxu@nadeko.net>
This commit is contained in:
parent
8487e01064
commit
46d39c3066
1 changed files with 3 additions and 4 deletions
|
@ -82,13 +82,12 @@ module Invidious::Routes::Channels
|
||||||
end
|
end
|
||||||
next_continuation = nil
|
next_continuation = nil
|
||||||
else
|
else
|
||||||
# TODO: support sort option for shorts
|
sort_by = env.params.query["sort_by"]?.try &.downcase || "newest"
|
||||||
sort_by = ""
|
sort_options = {"newest", "oldest", "popular"}
|
||||||
sort_options = [] of String
|
|
||||||
|
|
||||||
# Fetch items and continuation token
|
# Fetch items and continuation token
|
||||||
items, next_continuation = Channel::Tabs.get_shorts(
|
items, next_continuation = Channel::Tabs.get_shorts(
|
||||||
channel, continuation: continuation
|
channel, continuation: continuation, sort_by: sort_by
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue