diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-09-04 09:57:40 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-09-04 09:57:40 -0500 |
| commit | 40028e146227b3e656f7d10b8cb3c32e6fde2e83 (patch) | |
| tree | 84788d190c569368a68c2da1ded1ad29447985fa /src | |
| parent | 53732cdcab585da26505a41dcf0d87a36d957502 (diff) | |
| download | invidious-40028e146227b3e656f7d10b8cb3c32e6fde2e83.tar.gz invidious-40028e146227b3e656f7d10b8cb3c32e6fde2e83.tar.bz2 invidious-40028e146227b3e656f7d10b8cb3c32e6fde2e83.zip | |
Update SQL and remove migration points
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/videos.cr | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index e0bcd64c..ca776d30 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -376,13 +376,11 @@ def get_video(id, db, refresh = true) video = fetch_video(id) video_array = video.to_a - # MIGRATION POINT - video_array = video_array[0..-2] - args = arg_array(video_array[1..-1], 2) db.exec("UPDATE videos SET (info,updated,title,views,likes,dislikes,wilson_score,\ - published,description,language,author,ucid, allowed_regions, is_family_friendly, genre)\ + published,description,language,author,ucid, allowed_regions, is_family_friendly,\ + genre, genre_url)\ = (#{args}) WHERE id = $1", video_array) rescue ex db.exec("DELETE FROM videos * WHERE id = $1", id) @@ -393,9 +391,6 @@ def get_video(id, db, refresh = true) video = fetch_video(id) video_array = video.to_a - # MIGRATION POINT - video_array = video_array[0..-2] - args = arg_array(video_array) db.exec("INSERT INTO videos VALUES (#{args}) ON CONFLICT (id) DO NOTHING", video_array) |
