mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Support changing author names
This commit is contained in:
parent
b030149d76
commit
843606db65
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ def get_channel(id, client, db, refresh = true, pull_all_videos = true)
|
||||||
args = arg_array(channel_array)
|
args = arg_array(channel_array)
|
||||||
|
|
||||||
db.exec("INSERT INTO channels VALUES (#{args}) \
|
db.exec("INSERT INTO channels VALUES (#{args}) \
|
||||||
ON CONFLICT (id) DO UPDATE SET updated = $3", channel_array)
|
ON CONFLICT (id) DO UPDATE SET author = $2, updated = $3", channel_array)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
channel = fetch_channel(id, client, db, pull_all_videos)
|
channel = fetch_channel(id, client, db, pull_all_videos)
|
||||||
|
|
|
@ -71,7 +71,7 @@ def refresh_channels(db, max_threads = 1, full_refresh = false)
|
||||||
client = make_client(YT_URL)
|
client = make_client(YT_URL)
|
||||||
channel = fetch_channel(id, client, db, full_refresh)
|
channel = fetch_channel(id, client, db, full_refresh)
|
||||||
|
|
||||||
db.exec("UPDATE channels SET updated = $1 WHERE id = $2", Time.now, id)
|
db.exec("UPDATE channels SET updated = $1, author = $2 WHERE id = $3", Time.now, channel.author, id)
|
||||||
rescue ex
|
rescue ex
|
||||||
STDOUT << id << " : " << ex.message << "\n"
|
STDOUT << id << " : " << ex.message << "\n"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue