From ed2a44149e1f506a97edc8bb0d750059544477a2 Mon Sep 17 00:00:00 2001 From: RadoslavL Date: Sat, 7 Oct 2023 17:55:42 +0300 Subject: [PATCH 1/3] Added authorVerified to the video API v1 route --- src/invidious/jsonify/api_v1/video_json.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/invidious/jsonify/api_v1/video_json.cr b/src/invidious/jsonify/api_v1/video_json.cr index fe4b5223..6d54bd9f 100644 --- a/src/invidious/jsonify/api_v1/video_json.cr +++ b/src/invidious/jsonify/api_v1/video_json.cr @@ -39,6 +39,7 @@ module Invidious::JSONify::APIv1 json.field "author", video.author json.field "authorId", video.ucid json.field "authorUrl", "/channel/#{video.ucid}" + json.field "authorVerified", video.info["authorVerified"] json.field "authorThumbnails" do json.array do From 7dc9b3f088a89683c90408a6e3ea65f8be9ad867 Mon Sep 17 00:00:00 2001 From: RadoslavL Date: Sat, 7 Oct 2023 20:29:48 +0300 Subject: [PATCH 2/3] Fixed formatting --- src/invidious/jsonify/api_v1/video_json.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/jsonify/api_v1/video_json.cr b/src/invidious/jsonify/api_v1/video_json.cr index 6d54bd9f..5f3e4cae 100644 --- a/src/invidious/jsonify/api_v1/video_json.cr +++ b/src/invidious/jsonify/api_v1/video_json.cr @@ -39,7 +39,7 @@ module Invidious::JSONify::APIv1 json.field "author", video.author json.field "authorId", video.ucid json.field "authorUrl", "/channel/#{video.ucid}" - json.field "authorVerified", video.info["authorVerified"] + json.field "authorVerified", video.info["authorVerified"] json.field "authorThumbnails" do json.array do From 8e45e05fbac1fd4db1230d800a515a9158339203 Mon Sep 17 00:00:00 2001 From: RadoslavL <63926126+RadoslavL@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:20:35 +0300 Subject: [PATCH 3/3] Get "author_verified" using the instance method instead of using the info hash. Co-authored-by: Samantaz Fox --- src/invidious/jsonify/api_v1/video_json.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/jsonify/api_v1/video_json.cr b/src/invidious/jsonify/api_v1/video_json.cr index 5f3e4cae..1651559a 100644 --- a/src/invidious/jsonify/api_v1/video_json.cr +++ b/src/invidious/jsonify/api_v1/video_json.cr @@ -39,7 +39,7 @@ module Invidious::JSONify::APIv1 json.field "author", video.author json.field "authorId", video.ucid json.field "authorUrl", "/channel/#{video.ucid}" - json.field "authorVerified", video.info["authorVerified"] + json.field "authorVerified", video.author_verified json.field "authorThumbnails" do json.array do