Invidious is an alternative front-end to YouTube
Update SQL and remove migration points
Omar Roth40028e146227
diff --git a/config/sql/videos.sql b/config/sql/videos.sqlindex 9f20e8c6..dc5e75b6 100644--- a/config/sql/videos.sql+++ b/config/sql/videos.sql@@ -20,6 +20,7 @@ CREATE TABLE public.videosallowed_regions text[] COLLATE pg_catalog."default",is_family_friendly boolean,genre text COLLATE pg_catalog."default",+ genre_url text COLLATE pg_catalog."default",CONSTRAINT videos_pkey PRIMARY KEY (id))WITH (diff --git a/src/invidious/videos.cr b/src/invidious/videos.crindex 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 exdb.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)