From 0f320037e689b2778959c12ddd4ce790f6e4ae4f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 May 2018 15:10:13 +0200 Subject: Add ability to update a video channel --- client/src/app/shared/video/video-edit.model.ts | 6 +++--- client/src/app/shared/video/video.model.ts | 10 ++++++++++ client/src/app/shared/video/video.service.ts | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/video') diff --git a/client/src/app/shared/video/video-edit.model.ts b/client/src/app/shared/video/video-edit.model.ts index 39826d71e..ad2929db5 100644 --- a/client/src/app/shared/video/video-edit.model.ts +++ b/client/src/app/shared/video/video-edit.model.ts @@ -10,7 +10,7 @@ export class VideoEdit { tags: string[] nsfw: boolean commentsEnabled: boolean - channel: number + channelId: number privacy: VideoPrivacy support: string thumbnailfile?: any @@ -32,7 +32,7 @@ export class VideoEdit { this.tags = videoDetails.tags this.nsfw = videoDetails.nsfw this.commentsEnabled = videoDetails.commentsEnabled - this.channel = videoDetails.channel.id + this.channelId = videoDetails.channel.id this.privacy = videoDetails.privacy.id this.support = videoDetails.support this.thumbnailUrl = videoDetails.thumbnailUrl @@ -57,7 +57,7 @@ export class VideoEdit { tags: this.tags, nsfw: this.nsfw, commentsEnabled: this.commentsEnabled, - channelId: this.channel, + channelId: this.channelId, privacy: this.privacy } } diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index f56eecaeb..48d562f9c 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts @@ -45,6 +45,16 @@ export class Video implements VideoServerModel { avatar: Avatar } + channel: { + id: number + uuid: string + name: string + displayName: string + url: string + host: string + avatar: Avatar + } + private static createDurationString (duration: number) { const hours = Math.floor(duration / 3600) const minutes = Math.floor(duration % 3600 / 60) diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts index b45777c55..cd8539b41 100644 --- a/client/src/app/shared/video/video.service.ts +++ b/client/src/app/shared/video/video.service.ts @@ -67,6 +67,7 @@ export class VideoService { language, support, description, + channelId: video.channelId, privacy: video.privacy, tags: video.tags, nsfw: video.nsfw, -- cgit v1.2.3