From eac85f111c351ce9123733c8fae06fa32d0eb9ca Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 10 Oct 2024 15:07:50 -0300 Subject: [PATCH] fixup! Feeds: Get rid of feed_needs_update() since it appears to be unused --- src/invidious/channels/channels.cr | 8 ++++---- src/invidious/database/users.cr | 20 ++++++++++---------- src/invidious/routes/feeds.cr | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/invidious/channels/channels.cr b/src/invidious/channels/channels.cr index 0a1d61a1..a37be6c7 100644 --- a/src/invidious/channels/channels.cr +++ b/src/invidious/channels/channels.cr @@ -251,8 +251,8 @@ def fetch_channel(ucid, pull_all_videos : Bool) LOGGER.trace("fetch_channel: #{ucid} : video #{video_id} : Inserted, updating subscriptions") if CONFIG.enable_user_notifications Invidious::Database::Users.add_notification(video) - # else - # Invidious::Database::Users.feed_needs_update(video) + # else + # Invidious::Database::Users.feed_needs_update(video) end else LOGGER.trace("fetch_channel: #{ucid} : video #{video_id} : Updated") @@ -287,8 +287,8 @@ def fetch_channel(ucid, pull_all_videos : Bool) if was_insert if CONFIG.enable_user_notifications Invidious::Database::Users.add_notification(video) - # else - # Invidious::Database::Users.feed_needs_update(video) + # else + # Invidious::Database::Users.feed_needs_update(video) end end end diff --git a/src/invidious/database/users.cr b/src/invidious/database/users.cr index c263f798..7ac14a52 100644 --- a/src/invidious/database/users.cr +++ b/src/invidious/database/users.cr @@ -154,17 +154,17 @@ module Invidious::Database::Users # Update (misc) # ------------------- -# Feeds never need update. PubSubHubBub is the one that sends videos to -# invidious. -# def feed_needs_update(video : ChannelVideo) -# request = <<-SQL -# UPDATE users -# SET feed_needs_update = true -# WHERE $1 = ANY(subscriptions) -# SQL + # Feeds never need update. PubSubHubBub is the one that sends videos to + # invidious. + # def feed_needs_update(video : ChannelVideo) + # request = <<-SQL + # UPDATE users + # SET feed_needs_update = true + # WHERE $1 = ANY(subscriptions) + # SQL -# PG_DB.exec(request, video.ucid) -# end + # PG_DB.exec(request, video.ucid) + # end def update_preferences(user : User) request = <<-SQL diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.cr index e1b13656..19f8aac2 100644 --- a/src/invidious/routes/feeds.cr +++ b/src/invidious/routes/feeds.cr @@ -450,8 +450,8 @@ module Invidious::Routes::Feeds if was_insert if CONFIG.enable_user_notifications Invidious::Database::Users.add_notification(video) - # else - # Invidious::Database::Users.feed_needs_update(video) + # else + # Invidious::Database::Users.feed_needs_update(video) end end end