summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/invidious.cr3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 5f7cec7a..5d929996 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -1419,7 +1419,8 @@ get "/feed/subscriptions" do |env|
id NOT IN (#{watched}) ORDER BY ucid, published DESC",
user.watched, as: ChannelVideo)
else
- videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name}", as: ChannelVideo)
+ videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} \
+ ORDER BY ucid, published DESC", as: ChannelVideo)
end
videos.sort_by! { |video| video.published }.reverse!