Sort channel shorts API

pull/5071/head
Brahim Hadriche 2024-11-09 17:49:06 -05:00
rodzic b173d4acf2
commit d2123b4682
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -197,6 +197,7 @@ module Invidious::Routes::API::V1::Channels
get_channel()
# Retrieve continuation from URL parameters
sort_by = env.params.query["sort_by"]?.try &.downcase || "newest"
continuation = env.params.query["continuation"]?
if channel.is_age_gated
@ -211,7 +212,7 @@ module Invidious::Routes::API::V1::Channels
else
begin
videos, next_continuation = Channel::Tabs.get_shorts(
channel, continuation: continuation
channel, continuation: continuation, sort_by: sort_by
)
rescue ex
return error_json(500, ex)