From f595d3947708114deeed4312cc5ffd285745b090 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Dec 2017 17:31:21 +0100 Subject: Finish admin design --- server/models/video/video.ts | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 8b1eb1f96..d46fdeebe 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -564,6 +564,22 @@ toActivityPubObject = function (this: VideoInstance) { } } + let category + if (this.category) { + category = { + identifier: this.category + '', + name: this.getCategoryLabel() + } + } + + let licence + if (this.licence) { + licence = { + identifier: this.licence + '', + name: this.getLicenceLabel() + } + } + let likesObject let dislikesObject @@ -635,14 +651,8 @@ toActivityPubObject = function (this: VideoInstance) { duration: 'PT' + this.duration + 'S', uuid: this.uuid, tag, - category: { - identifier: this.category + '', - name: this.getCategoryLabel() - }, - licence: { - identifier: this.licence + '', - name: this.getLicenceLabel() - }, + category, + licence, language, views: this.views, nsfw: this.nsfw, -- cgit v1.2.3