From d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 28 Jun 2021 17:30:59 +0200 Subject: Support short uuid for GET video/playlist --- client/src/app/shared/shared-main/video/video.model.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/shared-main/video') diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts index ab8ed9051..f0a4a3f37 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts @@ -26,12 +26,18 @@ export class Video implements VideoServerModel { licence: VideoConstant language: VideoConstant privacy: VideoConstant + description: string + duration: number durationLabel: string + id: number uuid: string + shortUUID: string + isLocal: boolean + name: string serverHost: string thumbnailPath: string @@ -85,8 +91,12 @@ export class Video implements VideoServerModel { pluginData?: any - static buildClientUrl (videoUUID: string) { - return '/w/' + videoUUID + static buildWatchUrl (video: Partial>) { + return '/w/' + (video.shortUUID || video.uuid) + } + + static buildUpdateUrl (video: Pick) { + return '/videos/update/' + video.uuid } constructor (hash: VideoServerModel, translations = {}) { @@ -109,6 +119,7 @@ export class Video implements VideoServerModel { this.id = hash.id this.uuid = hash.uuid + this.shortUUID = hash.shortUUID this.isLocal = hash.isLocal this.name = hash.name -- cgit v1.2.3