diff options
Diffstat (limited to 'shared/models/videos')
7 files changed, 27 insertions, 2 deletions
diff --git a/shared/models/videos/blacklist/video-blacklist-create.model.ts b/shared/models/videos/blacklist/video-blacklist-create.model.ts index 89c69cb56..6e7d36421 100644 --- a/shared/models/videos/blacklist/video-blacklist-create.model.ts +++ b/shared/models/videos/blacklist/video-blacklist-create.model.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export interface VideoBlacklistCreate { | 1 | export interface VideoBlacklistCreate { |
2 | reason?: string | 2 | reason?: string |
3 | unfederate?: boolean | ||
3 | } | 4 | } |
diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts index ef4e5e3a2..4bd976190 100644 --- a/shared/models/videos/blacklist/video-blacklist.model.ts +++ b/shared/models/videos/blacklist/video-blacklist.model.ts | |||
@@ -2,6 +2,7 @@ export interface VideoBlacklist { | |||
2 | id: number | 2 | id: number |
3 | createdAt: Date | 3 | createdAt: Date |
4 | updatedAt: Date | 4 | updatedAt: Date |
5 | unfederated: boolean | ||
5 | reason?: string | 6 | reason?: string |
6 | 7 | ||
7 | video: { | 8 | video: { |
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts index 392bd1025..53631bf79 100644 --- a/shared/models/videos/video-create.model.ts +++ b/shared/models/videos/video-create.model.ts | |||
@@ -13,6 +13,7 @@ export interface VideoCreate { | |||
13 | name: string | 13 | name: string |
14 | tags?: string[] | 14 | tags?: string[] |
15 | commentsEnabled?: boolean | 15 | commentsEnabled?: boolean |
16 | downloadEnabled?: boolean | ||
16 | privacy: VideoPrivacy | 17 | privacy: VideoPrivacy |
17 | scheduleUpdate?: VideoScheduleUpdate | 18 | scheduleUpdate?: VideoScheduleUpdate |
18 | originallyPublishedAt: Date | string | 19 | originallyPublishedAt: Date | string |
diff --git a/shared/models/videos/video-streaming-playlist.model.ts b/shared/models/videos/video-streaming-playlist.model.ts new file mode 100644 index 000000000..17f8fe865 --- /dev/null +++ b/shared/models/videos/video-streaming-playlist.model.ts | |||
@@ -0,0 +1,12 @@ | |||
1 | import { VideoStreamingPlaylistType } from './video-streaming-playlist.type' | ||
2 | |||
3 | export class VideoStreamingPlaylist { | ||
4 | id: number | ||
5 | type: VideoStreamingPlaylistType | ||
6 | playlistUrl: string | ||
7 | segmentsSha256Url: string | ||
8 | |||
9 | redundancies: { | ||
10 | baseUrl: string | ||
11 | }[] | ||
12 | } | ||
diff --git a/shared/models/videos/video-streaming-playlist.type.ts b/shared/models/videos/video-streaming-playlist.type.ts new file mode 100644 index 000000000..3b403f295 --- /dev/null +++ b/shared/models/videos/video-streaming-playlist.type.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export enum VideoStreamingPlaylistType { | ||
2 | HLS = 1 | ||
3 | } | ||
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts index 62e02e079..4ef904156 100644 --- a/shared/models/videos/video-update.model.ts +++ b/shared/models/videos/video-update.model.ts | |||
@@ -11,6 +11,7 @@ export interface VideoUpdate { | |||
11 | privacy?: VideoPrivacy | 11 | privacy?: VideoPrivacy |
12 | tags?: string[] | 12 | tags?: string[] |
13 | commentsEnabled?: boolean | 13 | commentsEnabled?: boolean |
14 | downloadEnabled?: boolean | ||
14 | nsfw?: boolean | 15 | nsfw?: boolean |
15 | waitTranscoding?: boolean | 16 | waitTranscoding?: boolean |
16 | channelId?: number | 17 | channelId?: number |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 2373ceb18..df800461c 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -5,6 +5,7 @@ import { VideoChannel } from './channel/video-channel.model' | |||
5 | import { VideoPrivacy } from './video-privacy.enum' | 5 | import { VideoPrivacy } from './video-privacy.enum' |
6 | import { VideoScheduleUpdate } from './video-schedule-update.model' | 6 | import { VideoScheduleUpdate } from './video-schedule-update.model' |
7 | import { VideoConstant } from './video-constant.model' | 7 | import { VideoConstant } from './video-constant.model' |
8 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' | ||
8 | 9 | ||
9 | export interface VideoFile { | 10 | export interface VideoFile { |
10 | magnetUri: string | 11 | magnetUri: string |
@@ -24,7 +25,7 @@ export interface VideoChannelAttribute { | |||
24 | displayName: string | 25 | displayName: string |
25 | url: string | 26 | url: string |
26 | host: string | 27 | host: string |
27 | avatar: Avatar | 28 | avatar?: Avatar |
28 | } | 29 | } |
29 | 30 | ||
30 | export interface AccountAttribute { | 31 | export interface AccountAttribute { |
@@ -34,7 +35,7 @@ export interface AccountAttribute { | |||
34 | displayName: string | 35 | displayName: string |
35 | url: string | 36 | url: string |
36 | host: string | 37 | host: string |
37 | avatar: Avatar | 38 | avatar?: Avatar |
38 | } | 39 | } |
39 | 40 | ||
40 | export interface Video { | 41 | export interface Video { |
@@ -83,8 +84,13 @@ export interface VideoDetails extends Video { | |||
83 | files: VideoFile[] | 84 | files: VideoFile[] |
84 | account: Account | 85 | account: Account |
85 | commentsEnabled: boolean | 86 | commentsEnabled: boolean |
87 | downloadEnabled: boolean | ||
86 | 88 | ||
87 | // Not optional in details (unlike in Video) | 89 | // Not optional in details (unlike in Video) |
88 | waitTranscoding: boolean | 90 | waitTranscoding: boolean |
89 | state: VideoConstant<VideoState> | 91 | state: VideoConstant<VideoState> |
92 | |||
93 | trackerUrls: string[] | ||
94 | |||
95 | streamingPlaylists: VideoStreamingPlaylist[] | ||
90 | } | 96 | } |