mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-22 21:47:26 +00:00
Remove migration points
This commit is contained in:
parent
f88697541c
commit
6e0df50a03
@ -492,20 +492,12 @@ def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32})
|
|||||||
video = fetch_video(id, proxies)
|
video = fetch_video(id, proxies)
|
||||||
video_array = video.to_a
|
video_array = video.to_a
|
||||||
|
|
||||||
# Migration point
|
|
||||||
video_array = video_array[0..-2]
|
|
||||||
|
|
||||||
args = arg_array(video_array[1..-1], 2)
|
args = arg_array(video_array[1..-1], 2)
|
||||||
|
|
||||||
# Migration point
|
|
||||||
# db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\
|
|
||||||
# published,description,language,author,ucid,allowed_regions,is_family_friendly,\
|
|
||||||
# genre,genre_url,license,sub_count_text,author_thumbnail)\
|
|
||||||
# = (#{args}) WHERE id = $1", video_array)
|
|
||||||
db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\
|
db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\
|
||||||
published,description,language,author,ucid,allowed_regions,is_family_friendly,\
|
published,description,language,author,ucid,allowed_regions,is_family_friendly,\
|
||||||
genre,genre_url,license,sub_count_text)\
|
genre,genre_url,license,sub_count_text,author_thumbnail)\
|
||||||
= (#{args}) WHERE id = $1", video_array)
|
= (#{args}) WHERE id = $1", video_array)
|
||||||
rescue ex
|
rescue ex
|
||||||
db.exec("DELETE FROM videos * WHERE id = $1", id)
|
db.exec("DELETE FROM videos * WHERE id = $1", id)
|
||||||
raise ex
|
raise ex
|
||||||
@ -515,9 +507,6 @@ def get_video(id, db, proxies = {} of String => Array({ip: String, port: Int32})
|
|||||||
video = fetch_video(id, proxies)
|
video = fetch_video(id, proxies)
|
||||||
video_array = video.to_a
|
video_array = video.to_a
|
||||||
|
|
||||||
# Migration point
|
|
||||||
video_array = video_array[0..-2]
|
|
||||||
|
|
||||||
args = arg_array(video_array)
|
args = arg_array(video_array)
|
||||||
|
|
||||||
db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", video_array)
|
db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", video_array)
|
||||||
|
Loading…
Reference in New Issue
Block a user