File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,16 @@ module Invidious::Database::Channels
4242 PG_DB .exec(request, Time .utc, author, id)
4343 end
4444
45+ def update_subscription_time (id : String )
46+ request = <<-SQL
47+ UPDATE channels
48+ SET subscribed = $1
49+ WHERE id = $2
50+ SQL
51+
52+ PG_DB .exec(request, Time .utc, id)
53+ end
54+
4555 def update_mark_deleted (id : String )
4656 request = <<-SQL
4757 UPDATE channels
Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ module Invidious::Routes::Feeds
362362 end
363363
364364 if ucid = HTTP ::Params .parse(URI .parse(topic).query.not_nil!)[" channel_id" ]?
365- PG_DB .exec( " UPDATE channels SET subscribed = $1 WHERE id = $2 " , Time .utc, ucid)
365+ Invidious :: Database :: Channels .update_subscription_time( ucid)
366366 elsif plid = HTTP ::Params .parse(URI .parse(topic).query.not_nil!)[" playlist_id" ]?
367367 Invidious ::Database ::Playlists .update_subscription_time(plid)
368368 else
You can’t perform that action at this time.
0 commit comments