mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Fix sorting for latest_only
This commit is contained in:
parent
2840d98fd4
commit
2a1befb41a
1 changed files with 2 additions and 2 deletions
|
@ -1964,7 +1964,7 @@ get "/feed/subscriptions" do |env|
|
|||
# Show latest video from each channel
|
||||
|
||||
videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} \
|
||||
ORDER BY ucid, published", as: ChannelVideo)
|
||||
ORDER BY ucid, published DESC", as: ChannelVideo)
|
||||
end
|
||||
|
||||
videos.sort_by! { |video| video.published }.reverse!
|
||||
|
@ -2210,7 +2210,7 @@ get "/feed/private" do |env|
|
|||
|
||||
if latest_only
|
||||
videos = PG_DB.query_all("SELECT DISTINCT ON (ucid) * FROM #{view_name} \
|
||||
ORDER BY ucid, published", as: ChannelVideo)
|
||||
ORDER BY ucid, published DESC", as: ChannelVideo)
|
||||
|
||||
videos.sort_by! { |video| video.published }.reverse!
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue