Skip to content

Invidious is an alternative front-end to YouTube

Update channel when fetched by thread

Omar Rothcc047bb5e5a9
diff --git a/src/invidious.cr b/src/invidious.cr
index 8f7bf2ee..de247592 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -138,6 +138,7 @@ channel_threads.times do |i|
begin
id = rs.read(String)
channel = fetch_channel(id, client, PG_DB, false)
+ PG_DB.exec("UPDATE channels SET updated = $1 WHERE id = $2", Time.now, id)
rescue ex
STDOUT << id << " : " << ex.message << "\n"
next