aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-comment
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-video-comment
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-video-comment')
-rw-r--r--client/src/app/shared/shared-video-comment/video-comment.model.ts4
-rw-r--r--client/src/app/shared/shared-video-comment/video-comment.service.ts7
2 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-video-comment/video-comment.model.ts b/client/src/app/shared/shared-video-comment/video-comment.model.ts
index 94d6c5fa8..ba0f57e8f 100644
--- a/client/src/app/shared/shared-video-comment/video-comment.model.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment.model.ts
@@ -1,5 +1,5 @@
1import { getAbsoluteAPIUrl } from '@app/helpers' 1import { getAbsoluteAPIUrl } from '@app/helpers'
2import { Account, Actor } from '@app/shared/shared-main' 2import { Account, Actor, Video } from '@app/shared/shared-main'
3import { Account as AccountInterface, VideoComment as VideoCommentServerModel, VideoCommentAdmin as VideoCommentAdminServerModel } from '@shared/models' 3import { Account as AccountInterface, VideoComment as VideoCommentServerModel, VideoCommentAdmin as VideoCommentAdminServerModel } from '@shared/models'
4 4
5export class VideoComment implements VideoCommentServerModel { 5export class VideoComment implements VideoCommentServerModel {
@@ -85,7 +85,7 @@ export class VideoCommentAdmin implements VideoCommentAdminServerModel {
85 id: hash.video.id, 85 id: hash.video.id,
86 uuid: hash.video.uuid, 86 uuid: hash.video.uuid,
87 name: hash.video.name, 87 name: hash.video.name,
88 localUrl: '/w/' + hash.video.uuid 88 localUrl: Video.buildWatchUrl(hash.video)
89 } 89 }
90 90
91 this.localUrl = this.video.localUrl + ';threadId=' + this.threadId 91 this.localUrl = this.video.localUrl + ';threadId=' + this.threadId
diff --git a/client/src/app/shared/shared-video-comment/video-comment.service.ts b/client/src/app/shared/shared-video-comment/video-comment.service.ts
index c5aeb3c12..4f1452116 100644
--- a/client/src/app/shared/shared-video-comment/video-comment.service.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment.service.ts
@@ -9,6 +9,7 @@ import {
9 FeedFormat, 9 FeedFormat,
10 ResultList, 10 ResultList,
11 ThreadsResultList, 11 ThreadsResultList,
12 Video,
12 VideoComment as VideoCommentServerModel, 13 VideoComment as VideoCommentServerModel,
13 VideoCommentAdmin, 14 VideoCommentAdmin,
14 VideoCommentCreate, 15 VideoCommentCreate,
@@ -127,7 +128,7 @@ export class VideoCommentService {
127 ) 128 )
128 } 129 }
129 130
130 getVideoCommentsFeeds (videoUUID?: string) { 131 getVideoCommentsFeeds (video: Pick<Video, 'uuid'>) {
131 const feeds = [ 132 const feeds = [
132 { 133 {
133 format: FeedFormat.RSS, 134 format: FeedFormat.RSS,
@@ -146,9 +147,9 @@ export class VideoCommentService {
146 } 147 }
147 ] 148 ]
148 149
149 if (videoUUID !== undefined) { 150 if (video !== undefined) {
150 for (const feed of feeds) { 151 for (const feed of feeds) {
151 feed.url += '?videoId=' + videoUUID 152 feed.url += '?videoId=' + video.uuid
152 } 153 }
153 } 154 }
154 155