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-share-modal/video-share.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/shared-share-modal') diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts index 2a73e6166..a41ff248b 100644 --- a/client/src/app/shared/shared-share-modal/video-share.component.ts +++ b/client/src/app/shared/shared-share-modal/video-share.component.ts @@ -1,5 +1,5 @@ import { Component, ElementRef, Input, ViewChild } from '@angular/core' -import { VideoDetails } from '@app/shared/shared-main' +import { Video, VideoDetails } from '@app/shared/shared-main' import { VideoPlaylist } from '@app/shared/shared-video-playlist' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { VideoCaption } from '@shared/models' @@ -98,14 +98,15 @@ export class VideoShareComponent { getVideoUrl () { let baseUrl = this.customizations.originUrl ? this.video.originInstanceUrl : window.location.origin - baseUrl += '/w/' + this.video.uuid + baseUrl += Video.buildWatchUrl(this.video) + const options = this.getVideoOptions(baseUrl) return buildVideoLink(options) } getPlaylistUrl () { - const base = window.location.origin + '/w/p/' + this.playlist.uuid + const base = window.location.origin + VideoPlaylist.buildWatchUrl(this.playlist) if (!this.includeVideoInPlaylist) return base -- cgit v1.2.3