diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-26 10:55:40 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 418d092afa81e2c8fe8ac6838fc4b5eb0af6a782 (patch) | |
tree | 5e9bc5604fd5d66a006cfebb7acdbdd5486e5d1e /server/lib/activitypub/url.ts | |
parent | b427febb4d5cebf03b815bca2c59af6e82491569 (diff) | |
download | PeerTube-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.ts | 12 |
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' | |||
7 | import { VideoFileModel } from '../../models/video/video-file' | 7 | import { VideoFileModel } from '../../models/video/video-file' |
8 | import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' | 8 | import { VideoStreamingPlaylist } from '../../../shared/models/videos/video-streaming-playlist.model' |
9 | import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist' | 9 | import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist' |
10 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | ||
11 | import { VideoPlaylistElementModel } from '../../models/video/video-playlist-element' | ||
10 | 12 | ||
11 | function getVideoActivityPubUrl (video: VideoModel) { | 13 | function 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 | ||
17 | function getVideoPlaylistActivityPubUrl (videoPlaylist: VideoPlaylistModel) { | ||
18 | return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid | ||
19 | } | ||
20 | |||
21 | function getVideoPlaylistElementActivityPubUrl (videoPlaylist: VideoPlaylistModel, video: VideoModel) { | ||
22 | return CONFIG.WEBSERVER.URL + '/video-playlists/' + videoPlaylist.uuid + '/' + video.uuid | ||
23 | } | ||
24 | |||
15 | function getVideoCacheFileActivityPubUrl (videoFile: VideoFileModel) { | 25 | function 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 | ||
99 | export { | 109 | export { |
100 | getVideoActivityPubUrl, | 110 | getVideoActivityPubUrl, |
111 | getVideoPlaylistElementActivityPubUrl, | ||
112 | getVideoPlaylistActivityPubUrl, | ||
101 | getVideoCacheStreamingPlaylistActivityPubUrl, | 113 | getVideoCacheStreamingPlaylistActivityPubUrl, |
102 | getVideoChannelActivityPubUrl, | 114 | getVideoChannelActivityPubUrl, |
103 | getAccountActivityPubUrl, | 115 | getAccountActivityPubUrl, |