aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/url.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-02-26 10:55:40 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-03-18 11:17:59 +0100
commit418d092afa81e2c8fe8ac6838fc4b5eb0af6a782 (patch)
tree5e9bc5604fd5d66a006cfebb7acdbdd5486e5d1e /server/lib/activitypub/url.ts
parentb427febb4d5cebf03b815bca2c59af6e82491569 (diff)
downloadPeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.tar.gz
PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.tar.zst
PeerTube-418d092afa81e2c8fe8ac6838fc4b5eb0af6a782.zip
Playlist server API
Diffstat (limited to 'server/lib/activitypub/url.ts')
-rw-r--r--server/lib/activitypub/url.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts
index 4229fe094..00bbbba2d 100644
--- a/server/lib/activitypub/url.ts
+++ b/server/lib/activitypub/url.ts
@@ -7,11 +7,21 @@ import { VideoCommentModel } from '../../models/video/video-comment'
7import { VideoFileModel } from '../../models/video/video-file' 7import { VideoFileModel } from '../../models/video/video-file'
8import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' 8import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model'
9import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist' 9import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist'
10import { VideoPlaylistModel } from '../../models/video/video-playlist'
11import { VideoPlaylistElementModel } from '../../models/video/video-playlist-element'
10 12
11function getVideoActivityPubUrl (video: VideoModel) { 13function getVideoActivityPubUrl (video: VideoModel) {
12 return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid 14 return CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
13} 15}
14 16
17function getVideoPlaylistActivityPubUrl (videoPlaylist: VideoPlaylistModel) {
18 return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid
19}
20
21function getVideoPlaylistElementActivityPubUrl (videoPlaylist: VideoPlaylistModel, video: VideoModel) {
22 return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid + '/' + video.uuid
23}
24
15function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) { 25function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) {
16 const suffixFPS = videoFile.fps && videoFile.fps !== -1 ? '-' + videoFile.fps : '' 26 const suffixFPS = videoFile.fps && videoFile.fps !== -1 ? '-' + videoFile.fps : ''
17 27
@@ -98,6 +108,8 @@ function getUndoActivityPubUrl (originalUrl: string) {
98 108
99export { 109export {
100 getVideoActivityPubUrl, 110 getVideoActivityPubUrl,
111 getVideoPlaylistElementActivityPubUrl,
112 getVideoPlaylistActivityPubUrl,
101 getVideoCacheStreamingPlaylistActivityPubUrl, 113 getVideoCacheStreamingPlaylistActivityPubUrl,
102 getVideoChannelActivityPubUrl, 114 getVideoChannelActivityPubUrl,
103 getAccountActivityPubUrl, 115 getAccountActivityPubUrl,