+ // Maybe our pod is not up to date and there are new licences since our version
+ let licenceLabel = VIDEO_LICENCES[this.licence]
+ if (!licenceLabel) licenceLabel = 'Unknown'
+
+ // Language is an optional attribute
+ let languageLabel = VIDEO_LANGUAGES[this.language]
+ if (!languageLabel) languageLabel = 'Unknown'
+
+ const json = {
+ id: this.id,
+ uuid: this.uuid,
+ name: this.name,
+ category: this.category,
+ categoryLabel,
+ licence: this.licence,
+ licenceLabel,
+ language: this.language,
+ languageLabel,
+ nsfw: this.nsfw,
+ description: this.description,
+ podHost,
+ isLocal: this.isOwned(),
+ author: this.VideoChannel.Author.name,
+ duration: this.duration,
+ views: this.views,
+ likes: this.likes,
+ dislikes: this.dislikes,
+ tags: map<TagInstance, string>(this.Tags, 'name'),
+ thumbnailPath: this.getThumbnailPath(),
+ previewPath: this.getPreviewPath(),
+ embedPath: this.getEmbedPath(),
+ createdAt: this.createdAt,
+ updatedAt: this.updatedAt