From d19749734985c1cc057a27494bbaf64a54bcf348 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 3 Jun 2019 13:36:34 -0500 Subject: [PATCH] Add 'type' field to ChannelVideo and Video --- src/invidious/channels.cr | 2 ++ src/invidious/videos.cr | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/invidious/channels.cr b/src/invidious/channels.cr index 0f760dad..bf897e7d 100644 --- a/src/invidious/channels.cr +++ b/src/invidious/channels.cr @@ -11,6 +11,8 @@ end struct ChannelVideo def to_json(locale, config, kemal_config, json : JSON::Builder) json.object do + json.field "type", "shortVideo" + json.field "title", self.title json.field "videoId", self.id json.field "videoThumbnails" do diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 6d87d8e5..a5841491 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -276,6 +276,8 @@ struct Video def to_json(locale, config, kemal_config, decrypt_function) JSON.build do |json| json.object do + json.field "type", "video" + json.field "title", self.title json.field "videoId", self.id json.field "videoThumbnails" do