From bfbd912886eba17b4aa9a40dcef2fddc685d85bf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 31 Jul 2019 15:57:32 +0200 Subject: Fix broken playlist api --- .../videos/playlist/video-exist-in-playlist.model.ts | 1 + .../videos/playlist/video-playlist-element.model.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 shared/models/videos/playlist/video-playlist-element.model.ts (limited to 'shared/models/videos/playlist') 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 @@ export type VideoExistInPlaylist = { [videoId: number ]: { + playlistElementId: number playlistId: number startTimestamp?: number 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 @@ +import { Video } from '../video.model' + +export enum VideoPlaylistElementType { + REGULAR = 0, + DELETED = 1, + PRIVATE = 2, + UNAVAILABLE = 3 // Blacklisted, blocked by the user/instance, NSFW... +} + +export interface VideoPlaylistElement { + id: number + position: number + startTimestamp: number + stopTimestamp: number + + type: VideoPlaylistElementType + + video?: Video +} -- cgit v1.2.3