diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-28 17:30:59 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-29 14:56:35 +0200 |
commit | d4a8e7a65f97bb3257facc13e1ae8ffdbad61ddb (patch) | |
tree | a4cb07318100031951c3dffc61f4f2cb95d2cbd0 /client/src/app/shared/shared-share-modal | |
parent | 62ddc31a9e4b92d7d27898ccfc363f68ab044139 (diff) | |
download | PeerTube-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')
-rw-r--r-- | client/src/app/shared/shared-share-modal/video-share.component.ts | 7 |
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 @@ | |||
1 | import { Component, ElementRef, Input, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, Input, ViewChild } from '@angular/core' |
2 | import { VideoDetails } from '@app/shared/shared-main' | 2 | import { Video, VideoDetails } from '@app/shared/shared-main' |
3 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' | 3 | import { VideoPlaylist } from '@app/shared/shared-video-playlist' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { VideoCaption } from '@shared/models' | 5 | import { 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 | ||