mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Remove migration points
This commit is contained in:
parent
e39dec9778
commit
596960f35a
1 changed files with 5 additions and 20 deletions
|
@ -97,20 +97,12 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
|||
db.exec("UPDATE users SET notifications = notifications || $1 \
|
||||
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, ucid)
|
||||
|
||||
# Migration point
|
||||
video_array = video.to_a[0..-2]
|
||||
# video_array = video.to_a
|
||||
|
||||
video_array = video.to_a
|
||||
args = arg_array(video_array)
|
||||
|
||||
# Migration point
|
||||
db.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||
updated = $4, ucid = $5, author = $6", video_array)
|
||||
|
||||
# db.exec("INSERT INTO channel_videos VALUES (#{args}) \
|
||||
# ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||
# updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
||||
ON CONFLICT (id) DO UPDATE SET title = $2, published = $3, \
|
||||
updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
||||
end
|
||||
else
|
||||
page = 1
|
||||
|
@ -147,18 +139,11 @@ def fetch_channel(ucid, client, db, pull_all_videos = true)
|
|||
db.exec("UPDATE users SET notifications = notifications || $1 \
|
||||
WHERE updated < $2 AND $3 = ANY(subscriptions) AND $1 <> ALL(notifications)", video.id, video.published, video.ucid)
|
||||
|
||||
# Migration point
|
||||
video_array = video.to_a[0..-2]
|
||||
# video_array = video.to_a
|
||||
|
||||
video_array = video.to_a
|
||||
args = arg_array(video_array)
|
||||
|
||||
# Migration point
|
||||
db.exec("INSERT INTO channel_videos VALUES (#{args}) ON CONFLICT (id) DO UPDATE SET title = $2, \
|
||||
published = $3, updated = $4, ucid = $5, author = $6", video_array)
|
||||
|
||||
# db.exec("INSERT INTO channel_videos VALUES (#{args}) ON CONFLICT (id) DO UPDATE SET title = $2, \
|
||||
# published = $3, updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
||||
published = $3, updated = $4, ucid = $5, author = $6, length_seconds = $7", video_array)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue