Channels: Add sort options to shorts

pull/5059/head
Samantaz Fox 2024-11-07 23:00:18 +01:00
rodzic cbc546f032
commit 82248fad02
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F42821059186176E
1 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -82,13 +82,12 @@ module Invidious::Routes::Channels
end
next_continuation = nil
else
# TODO: support sort option for shorts
sort_by = ""
sort_options = [] of String
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_shorts(
channel, continuation: continuation
channel, continuation: continuation, sort_by: sort_by
)
end