Invidious is an alternative front-end to YouTube
Move author and ucid into schema
Omar Rotha2e23f702217
diff --git a/config/sql/videos.sql b/config/sql/videos.sqlindex 2fb52946..63a42e66 100644--- a/config/sql/videos.sql+++ b/config/sql/videos.sql@@ -15,6 +15,8 @@ CREATE TABLE public.videospublished timestamp with time zone,description text COLLATE pg_catalog."default",language text COLLATE pg_catalog."default",+ author text COLLATE pg_catalog."default",+ ucid text COLLATE pg_catalog."default",CONSTRAINT videos_pkey PRIMARY KEY (id))WITH (diff --git a/src/helpers.cr b/src/helpers.crindex a88e9304..9375b3a6 100644--- a/src/helpers.cr+++ b/src/helpers.cr@@ -76,6 +76,8 @@ class Videopublished: Time,description: String,language: String?,+ author: String,+ ucid: String,})end@@ -194,8 +196,9 @@ def fetch_video(id, client)endtitle = info["title"]-views = info["view_count"].to_i64+ author = info["author"]+ ucid = info["ucid"]likes = html.xpath_node(%q(//button[@title="I like this"]/span))likes = likes.try &.content.delete(",").try &.to_i@@ -238,7 +241,7 @@ def fetch_video(id, client)endend- video = Video.new(id, info, Time.now, title, views, likes, dislikes, wilson_score, published, description, nil)+ video = Video.new(id, info, Time.now, title, views, likes, dislikes, wilson_score, published, description, nil, author, ucid)return videoend