aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-share-modal/video-share.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-28 17:30:59 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-29 14:56:35 +0200
commitd4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb (patch)
treea4cb07318100031951c3dffc61f4f2cb95d2cbd0 /client/src/app/shared/shared-share-modal/video-share.component.ts
parent62ddc31a9e4b92d7d27898ccfc363f68ab044139 (diff)
downloadPeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.tar.gz
PeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.tar.zst
PeerTube-d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb.zip
Support short uuid for GET video/playlist
Diffstat (limited to 'client/src/app/shared/shared-share-modal/video-share.component.ts')
-rw-r--r--client/src/app/shared/shared-share-modal/video-share.component.ts7
1 files changed, 4 insertions, 3 deletions
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 @@
1import { Component, ElementRef, Input, ViewChild } from '@angular/core' 1import { Component, ElementRef, Input, ViewChild } from '@angular/core'
2import { VideoDetails } from '@app/shared/shared-main' 2import { Video, VideoDetails } from '@app/shared/shared-main'
3import { VideoPlaylist } from '@app/shared/shared-video-playlist' 3import { VideoPlaylist } from '@app/shared/shared-video-playlist'
4import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 4import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
5import { VideoCaption } from '@shared/models' 5import { VideoCaption } from '@shared/models'
@@ -98,14 +98,15 @@ export class VideoShareComponent {
98 98
99 getVideoUrl () { 99 getVideoUrl () {
100 let baseUrl = this.customizations.originUrl ? this.video.originInstanceUrl : window.location.origin 100 let baseUrl = this.customizations.originUrl ? this.video.originInstanceUrl : window.location.origin
101 baseUrl += '/w/' + this.video.uuid 101 baseUrl += Video.buildWatchUrl(this.video)
102
102 const options = this.getVideoOptions(baseUrl) 103 const options = this.getVideoOptions(baseUrl)
103 104
104 return buildVideoLink(options) 105 return buildVideoLink(options)
105 } 106 }
106 107
107 getPlaylistUrl () { 108 getPlaylistUrl () {
108 const base = window.location.origin + '/w/p/' + this.playlist.uuid 109 const base = window.location.origin + VideoPlaylist.buildWatchUrl(this.playlist)
109 110
110 if (!this.includeVideoInPlaylist) return base 111 if (!this.includeVideoInPlaylist) return base
111 112