diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-06-03 13:36:34 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-06-03 13:36:34 -0500 |
| commit | d19749734985c1cc057a27494bbaf64a54bcf348 (patch) | |
| tree | aaec9a84a2bcdcadf1c2a9c1269091f354953761 /src | |
| parent | d892ba6aa5f83fab35d353e2f2c6f1ab16d0b832 (diff) | |
| download | invidious-d19749734985c1cc057a27494bbaf64a54bcf348.tar.gz invidious-d19749734985c1cc057a27494bbaf64a54bcf348.tar.bz2 invidious-d19749734985c1cc057a27494bbaf64a54bcf348.zip | |
Add 'type' field to ChannelVideo and Video
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/channels.cr | 2 | ||||
| -rw-r--r-- | src/invidious/videos.cr | 2 |
2 files changed, 4 insertions, 0 deletions
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 |
