mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-04 22:51:58 +00:00
Seperate new videos in subscription feed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user