diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-06 15:36:44 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | 830b4faff15fb9c81d88e8e69fcdf94aad32bef8 (patch) | |
tree | 53de6c9e30ce88734b4bdda62016e0498fe78491 /shared | |
parent | d4c9f45b31eda0b7a391ddc83eb290ca5cba311f (diff) | |
download | PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.tar.gz PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.tar.zst PeerTube-830b4faff15fb9c81d88e8e69fcdf94aad32bef8.zip |
Add/update/delete/list my playlists
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/videos/index.ts | 9 | ||||
-rw-r--r-- | shared/models/videos/playlist/video-playlist.model.ts | 2 | ||||
-rw-r--r-- | shared/utils/videos/video-playlists.ts | 12 |
3 files changed, 21 insertions, 2 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 056ae06da..9cf861048 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -11,6 +11,13 @@ export * from './blacklist/video-blacklist-update.model' | |||
11 | export * from './channel/video-channel-create.model' | 11 | export * from './channel/video-channel-create.model' |
12 | export * from './channel/video-channel-update.model' | 12 | export * from './channel/video-channel-update.model' |
13 | export * from './channel/video-channel.model' | 13 | export * from './channel/video-channel.model' |
14 | export * from './playlist/video-playlist-create.model' | ||
15 | export * from './playlist/video-playlist-element-create.model' | ||
16 | export * from './playlist/video-playlist-element-update.model' | ||
17 | export * from './playlist/video-playlist-privacy.model' | ||
18 | export * from './playlist/video-playlist-type.model' | ||
19 | export * from './playlist/video-playlist-update.model' | ||
20 | export * from './playlist/video-playlist.model' | ||
14 | export * from './video-change-ownership.model' | 21 | export * from './video-change-ownership.model' |
15 | export * from './video-change-ownership-create.model' | 22 | export * from './video-change-ownership-create.model' |
16 | export * from './video-create.model' | 23 | export * from './video-create.model' |
@@ -27,4 +34,4 @@ export * from './caption/video-caption-update.model' | |||
27 | export * from './import/video-import-create.model' | 34 | export * from './import/video-import-create.model' |
28 | export * from './import/video-import-state.enum' | 35 | export * from './import/video-import-state.enum' |
29 | export * from './import/video-import.model' | 36 | export * from './import/video-import.model' |
30 | export { VideoConstant } from './video-constant.model' | 37 | export * from './video-constant.model' |
diff --git a/shared/models/videos/playlist/video-playlist.model.ts b/shared/models/videos/playlist/video-playlist.model.ts index 7fec0e42b..c0941727a 100644 --- a/shared/models/videos/playlist/video-playlist.model.ts +++ b/shared/models/videos/playlist/video-playlist.model.ts | |||
@@ -21,6 +21,6 @@ export interface VideoPlaylist { | |||
21 | createdAt: Date | string | 21 | createdAt: Date | string |
22 | updatedAt: Date | string | 22 | updatedAt: Date | string |
23 | 23 | ||
24 | ownerAccount?: AccountSummary | 24 | ownerAccount: AccountSummary |
25 | videoChannel?: VideoChannelSummary | 25 | videoChannel?: VideoChannelSummary |
26 | } | 26 | } |
diff --git a/shared/utils/videos/video-playlists.ts b/shared/utils/videos/video-playlists.ts index 4af52ec0f..b84b21623 100644 --- a/shared/utils/videos/video-playlists.ts +++ b/shared/utils/videos/video-playlists.ts | |||
@@ -265,9 +265,21 @@ async function checkPlaylistFilesWereRemoved ( | |||
265 | } | 265 | } |
266 | } | 266 | } |
267 | 267 | ||
268 | function getVideoPlaylistPrivacies (url: string) { | ||
269 | const path = '/api/v1/video-playlists/privacies' | ||
270 | |||
271 | return makeGetRequest({ | ||
272 | url, | ||
273 | path, | ||
274 | statusCodeExpected: 200 | ||
275 | }) | ||
276 | } | ||
277 | |||
268 | // --------------------------------------------------------------------------- | 278 | // --------------------------------------------------------------------------- |
269 | 279 | ||
270 | export { | 280 | export { |
281 | getVideoPlaylistPrivacies, | ||
282 | |||
271 | getVideoPlaylistsList, | 283 | getVideoPlaylistsList, |
272 | getVideoChannelPlaylistsList, | 284 | getVideoChannelPlaylistsList, |
273 | getAccountPlaylistsList, | 285 | getAccountPlaylistsList, |