mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Seperate new videos in subscription feed
This commit is contained in:
parent
0e85a04761
commit
fdcfe0bb14
3 changed files with 30 additions and 1 deletions
|
@ -729,6 +729,11 @@ get "/feed/subscriptions" do |env|
|
|||
videos = PG_DB.query_all("SELECT * FROM channel_videos WHERE ucid IN (#{args}) \
|
||||
ORDER BY published DESC LIMIT $1 OFFSET $2", [limit, offset] + user.subscriptions, as: ChannelVideo)
|
||||
|
||||
notifications = PG_DB.query_one("SELECT notifications FROM users WHERE email = $1", user.email, as: Array(String))
|
||||
|
||||
notifications = videos.select { |v| notifications.includes? v.id }
|
||||
vidoes = videos - notifications
|
||||
|
||||
if !limit
|
||||
videos = videos[0..max_results]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue