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 | |
parent | 85394ba22a07bde1dfccebf3f591a5d6dbe9df56 (diff) | |
download | PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.tar.gz PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.tar.zst PeerTube-bfbd912886eba17b4aa9a40dcef2fddc685d85bf.zip |
Fix broken playlist api
Diffstat (limited to 'shared/models')
-rw-r--r-- | shared/models/videos/index.ts | 1 | ||||
-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 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 8 |
4 files changed, 21 insertions, 8 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index e3d78220e..194ae1b96 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -19,6 +19,7 @@ export * from './playlist/video-playlist-privacy.model' | |||
19 | export * from './playlist/video-playlist-type.model' | 19 | export * from './playlist/video-playlist-type.model' |
20 | export * from './playlist/video-playlist-update.model' | 20 | export * from './playlist/video-playlist-update.model' |
21 | export * from './playlist/video-playlist.model' | 21 | export * from './playlist/video-playlist.model' |
22 | export * from './playlist/video-playlist-element.model' | ||
22 | export * from './video-change-ownership.model' | 23 | export * from './video-change-ownership.model' |
23 | export * from './video-change-ownership-create.model' | 24 | export * from './video-change-ownership-create.model' |
24 | export * from './video-create.model' | 25 | export * from './video-create.model' |
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 | } | ||
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 0489147e4..e057b3e06 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -17,12 +17,6 @@ export interface VideoFile { | |||
17 | fps: number | 17 | fps: number |
18 | } | 18 | } |
19 | 19 | ||
20 | export interface PlaylistElement { | ||
21 | position: number | ||
22 | startTimestamp: number | ||
23 | stopTimestamp: number | ||
24 | } | ||
25 | |||
26 | export interface Video { | 20 | export interface Video { |
27 | id: number | 21 | id: number |
28 | uuid: string | 22 | uuid: string |
@@ -59,8 +53,6 @@ export interface Video { | |||
59 | userHistory?: { | 53 | userHistory?: { |
60 | currentTime: number | 54 | currentTime: number |
61 | } | 55 | } |
62 | |||
63 | playlistElement?: PlaylistElement | ||
64 | } | 56 | } |
65 | 57 | ||
66 | export interface VideoDetails extends Video { | 58 | export interface VideoDetails extends Video { |