diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2024-11-08 13:54:05 +0100 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2024-11-08 14:00:35 +0100 |
| commit | 301aeffa780fca321793f8c2ef46844d613ce5c3 (patch) | |
| tree | b27f85445dfe6bd6a1caf33660909879adc798a8 | |
| parent | d27a5e7fae4a826b66950422ff8dfec4123dabf1 (diff) | |
| download | invidious-301aeffa780fca321793f8c2ef46844d613ce5c3.tar.gz invidious-301aeffa780fca321793f8c2ef46844d613ce5c3.tar.bz2 invidious-301aeffa780fca321793f8c2ef46844d613ce5c3.zip | |
Channels: Multiple small fixes
Fix the "newest" link not being bold when 'sort_by' uses the default value
Show 60 videos per page, rather than 30
| -rw-r--r-- | src/invidious/routes/channels.cr | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index d4e9fa68..7d634cbb 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -20,10 +20,11 @@ module Invidious::Routes::Channels sort_by = env.params.query["sort_by"]?.try &.downcase if channel.auto_generated + sort_by ||= "last" sort_options = {"last", "oldest", "newest"} items, next_continuation = fetch_channel_playlists( - channel.ucid, channel.author, continuation, (sort_by || "last") + channel.ucid, channel.author, continuation, sort_by ) items.uniq! do |item| @@ -49,9 +50,11 @@ module Invidious::Routes::Channels end next_continuation = nil else + sort_by ||= "newest" sort_options = {"newest", "oldest", "popular"} - items, next_continuation = Channel::Tabs.get_videos( - channel, continuation: continuation, sort_by: (sort_by || "newest") + + items, next_continuation = Channel::Tabs.get_60_videos( + channel, continuation: continuation, sort_by: sort_by ) end end |
