diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-31 15:57:32 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-08-01 09:11:04 +0200 |
commit | bfbd912886eba17b4aa9a40dcef2fddc685d85bf (patch) | |
tree | 85e0f22980210a8ccd0888eb5e1790b152074677 /shared/models/videos/playlist | |
parent | 85394ba22a07bde1dfccebf3f591a5d6dbe9df56 (diff) | |
download | PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.tar.gz PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.tar.zst PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.zip |
Fix broken playlist api
Diffstat (limited to 'shared/models/videos/playlist')
-rw-r--r-- | shared/models/videos/playlist/video-exist-in-playlist.model.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/playlist/video-playlist-element.model.ts | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/shared/models/videos/playlist/video-exist-in-playlist.model.ts b/shared/models/videos/playlist/video-exist-in-playlist.model.ts index 71240f51d..1b57257e2 100644 --- a/shared/models/videos/playlist/video-exist-in-playlist.model.ts +++ b/shared/models/videos/playlist/video-exist-in-playlist.model.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | export type VideoExistInPlaylist = { | 1 | export type VideoExistInPlaylist = { |
2 | [videoId: number ]: { | 2 | [videoId: number ]: { |
3 | playlistElementId: number | ||
3 | playlistId: number | 4 | playlistId: number |
4 | startTimestamp?: number | 5 | startTimestamp?: number |
5 | stopTimestamp?: number | 6 | stopTimestamp?: number |
diff --git a/shared/models/videos/playlist/video-playlist-element.model.ts b/shared/models/videos/playlist/video-playlist-element.model.ts new file mode 100644 index 000000000..9a1203892 --- /dev/null +++ b/shared/models/videos/playlist/video-playlist-element.model.ts | |||
@@ -0,0 +1,19 @@ | |||
1 | import { Video } from '../video.model' | ||
2 | |||
3 | export enum VideoPlaylistElementType { | ||
4 | REGULAR = 0, | ||
5 | DELETED = 1, | ||
6 | PRIVATE = 2, | ||
7 | UNAVAILABLE = 3 // Blacklisted, blocked by the user/instance, NSFW... | ||
8 | } | ||
9 | |||
10 | export interface VideoPlaylistElement { | ||
11 | id: number | ||
12 | position: number | ||
13 | startTimestamp: number | ||
14 | stopTimestamp: number | ||
15 | |||
16 | type: VideoPlaylistElementType | ||
17 | |||
18 | video?: Video | ||
19 | } | ||