diff options
Diffstat (limited to 'shared/models/videos')
94 files changed, 0 insertions, 1039 deletions
diff --git a/shared/models/videos/blacklist/index.ts b/shared/models/videos/blacklist/index.ts deleted file mode 100644 index 66082be34..000000000 --- a/shared/models/videos/blacklist/index.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export * from './video-blacklist.model' | ||
2 | export * from './video-blacklist-create.model' | ||
3 | export * from './video-blacklist-update.model' | ||
diff --git a/shared/models/videos/blacklist/video-blacklist-create.model.ts b/shared/models/videos/blacklist/video-blacklist-create.model.ts deleted file mode 100644 index 6e7d36421..000000000 --- a/shared/models/videos/blacklist/video-blacklist-create.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoBlacklistCreate { | ||
2 | reason?: string | ||
3 | unfederate?: boolean | ||
4 | } | ||
diff --git a/shared/models/videos/blacklist/video-blacklist-update.model.ts b/shared/models/videos/blacklist/video-blacklist-update.model.ts deleted file mode 100644 index 0a86cf7b0..000000000 --- a/shared/models/videos/blacklist/video-blacklist-update.model.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export interface VideoBlacklistUpdate { | ||
2 | reason?: string | ||
3 | } | ||
diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts deleted file mode 100644 index 982a34592..000000000 --- a/shared/models/videos/blacklist/video-blacklist.model.ts +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | import { Video } from '../video.model' | ||
2 | |||
3 | export const enum VideoBlacklistType { | ||
4 | MANUAL = 1, | ||
5 | AUTO_BEFORE_PUBLISHED = 2 | ||
6 | } | ||
7 | |||
8 | export interface VideoBlacklist { | ||
9 | id: number | ||
10 | unfederated: boolean | ||
11 | reason?: string | ||
12 | type: VideoBlacklistType | ||
13 | |||
14 | video: Video | ||
15 | |||
16 | createdAt: Date | ||
17 | updatedAt: Date | ||
18 | } | ||
diff --git a/shared/models/videos/caption/index.ts b/shared/models/videos/caption/index.ts deleted file mode 100644 index 2a5ff512d..000000000 --- a/shared/models/videos/caption/index.ts +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | export * from './video-caption.model' | ||
2 | export * from './video-caption-update.model' | ||
diff --git a/shared/models/videos/caption/video-caption-update.model.ts b/shared/models/videos/caption/video-caption-update.model.ts deleted file mode 100644 index ff5728715..000000000 --- a/shared/models/videos/caption/video-caption-update.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoCaptionUpdate { | ||
2 | language: string | ||
3 | captionfile: Blob | ||
4 | } | ||
diff --git a/shared/models/videos/caption/video-caption.model.ts b/shared/models/videos/caption/video-caption.model.ts deleted file mode 100644 index 6d5665006..000000000 --- a/shared/models/videos/caption/video-caption.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | import { VideoConstant } from '../video-constant.model' | ||
2 | |||
3 | export interface VideoCaption { | ||
4 | language: VideoConstant<string> | ||
5 | captionPath: string | ||
6 | updatedAt: string | ||
7 | } | ||
diff --git a/shared/models/videos/change-ownership/index.ts b/shared/models/videos/change-ownership/index.ts deleted file mode 100644 index a942fb2cd..000000000 --- a/shared/models/videos/change-ownership/index.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export * from './video-change-ownership-accept.model' | ||
2 | export * from './video-change-ownership-create.model' | ||
3 | export * from './video-change-ownership.model' | ||
diff --git a/shared/models/videos/change-ownership/video-change-ownership-accept.model.ts b/shared/models/videos/change-ownership/video-change-ownership-accept.model.ts deleted file mode 100644 index f27247633..000000000 --- a/shared/models/videos/change-ownership/video-change-ownership-accept.model.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export interface VideoChangeOwnershipAccept { | ||
2 | channelId: number | ||
3 | } | ||
diff --git a/shared/models/videos/change-ownership/video-change-ownership-create.model.ts b/shared/models/videos/change-ownership/video-change-ownership-create.model.ts deleted file mode 100644 index 40fcca285..000000000 --- a/shared/models/videos/change-ownership/video-change-ownership-create.model.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export interface VideoChangeOwnershipCreate { | ||
2 | username: string | ||
3 | } | ||
diff --git a/shared/models/videos/change-ownership/video-change-ownership.model.ts b/shared/models/videos/change-ownership/video-change-ownership.model.ts deleted file mode 100644 index 3d31cad0a..000000000 --- a/shared/models/videos/change-ownership/video-change-ownership.model.ts +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | import { Account } from '../../actors' | ||
2 | import { Video } from '../video.model' | ||
3 | |||
4 | export interface VideoChangeOwnership { | ||
5 | id: number | ||
6 | status: VideoChangeOwnershipStatus | ||
7 | initiatorAccount: Account | ||
8 | nextOwnerAccount: Account | ||
9 | video: Video | ||
10 | createdAt: Date | ||
11 | } | ||
12 | |||
13 | export const enum VideoChangeOwnershipStatus { | ||
14 | WAITING = 'WAITING', | ||
15 | ACCEPTED = 'ACCEPTED', | ||
16 | REFUSED = 'REFUSED' | ||
17 | } | ||
diff --git a/shared/models/videos/channel-sync/index.ts b/shared/models/videos/channel-sync/index.ts deleted file mode 100644 index 7d25aaac3..000000000 --- a/shared/models/videos/channel-sync/index.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export * from './video-channel-sync-state.enum' | ||
2 | export * from './video-channel-sync.model' | ||
3 | export * from './video-channel-sync-create.model' | ||
diff --git a/shared/models/videos/channel-sync/video-channel-sync-create.model.ts b/shared/models/videos/channel-sync/video-channel-sync-create.model.ts deleted file mode 100644 index 753a8ee4c..000000000 --- a/shared/models/videos/channel-sync/video-channel-sync-create.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoChannelSyncCreate { | ||
2 | externalChannelUrl: string | ||
3 | videoChannelId: number | ||
4 | } | ||
diff --git a/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts b/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts deleted file mode 100644 index 3e9f5ddc2..000000000 --- a/shared/models/videos/channel-sync/video-channel-sync-state.enum.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export const enum VideoChannelSyncState { | ||
2 | WAITING_FIRST_RUN = 1, | ||
3 | PROCESSING = 2, | ||
4 | SYNCED = 3, | ||
5 | FAILED = 4 | ||
6 | } | ||
diff --git a/shared/models/videos/channel-sync/video-channel-sync.model.ts b/shared/models/videos/channel-sync/video-channel-sync.model.ts deleted file mode 100644 index 73ac0615b..000000000 --- a/shared/models/videos/channel-sync/video-channel-sync.model.ts +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | import { VideoChannelSummary } from '../channel/video-channel.model' | ||
2 | import { VideoConstant } from '../video-constant.model' | ||
3 | import { VideoChannelSyncState } from './video-channel-sync-state.enum' | ||
4 | |||
5 | export interface VideoChannelSync { | ||
6 | id: number | ||
7 | |||
8 | externalChannelUrl: string | ||
9 | |||
10 | createdAt: string | ||
11 | channel: VideoChannelSummary | ||
12 | state: VideoConstant<VideoChannelSyncState> | ||
13 | lastSyncAt: string | ||
14 | } | ||
diff --git a/shared/models/videos/channel/index.ts b/shared/models/videos/channel/index.ts deleted file mode 100644 index 6cdabffbd..000000000 --- a/shared/models/videos/channel/index.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export * from './video-channel-create-result.model' | ||
2 | export * from './video-channel-create.model' | ||
3 | export * from './video-channel-update.model' | ||
4 | export * from './video-channel.model' | ||
diff --git a/shared/models/videos/channel/video-channel-create-result.model.ts b/shared/models/videos/channel/video-channel-create-result.model.ts deleted file mode 100644 index e3d7aeb4c..000000000 --- a/shared/models/videos/channel/video-channel-create-result.model.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export interface VideoChannelCreateResult { | ||
2 | id: number | ||
3 | } | ||
diff --git a/shared/models/videos/channel/video-channel-create.model.ts b/shared/models/videos/channel/video-channel-create.model.ts deleted file mode 100644 index da8ce620c..000000000 --- a/shared/models/videos/channel/video-channel-create.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export interface VideoChannelCreate { | ||
2 | name: string | ||
3 | displayName: string | ||
4 | description?: string | ||
5 | support?: string | ||
6 | } | ||
diff --git a/shared/models/videos/channel/video-channel-update.model.ts b/shared/models/videos/channel/video-channel-update.model.ts deleted file mode 100644 index 8dde9188b..000000000 --- a/shared/models/videos/channel/video-channel-update.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | export interface VideoChannelUpdate { | ||
2 | displayName?: string | ||
3 | description?: string | ||
4 | support?: string | ||
5 | |||
6 | bulkVideosSupportUpdate?: boolean | ||
7 | } | ||
diff --git a/shared/models/videos/channel/video-channel.model.ts b/shared/models/videos/channel/video-channel.model.ts deleted file mode 100644 index ce5fc0e8d..000000000 --- a/shared/models/videos/channel/video-channel.model.ts +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | import { Account, ActorImage } from '../../actors' | ||
2 | import { Actor } from '../../actors/actor.model' | ||
3 | |||
4 | export type ViewsPerDate = { | ||
5 | date: Date | ||
6 | views: number | ||
7 | } | ||
8 | |||
9 | export interface VideoChannel extends Actor { | ||
10 | displayName: string | ||
11 | description: string | ||
12 | support: string | ||
13 | isLocal: boolean | ||
14 | |||
15 | updatedAt: Date | string | ||
16 | |||
17 | ownerAccount?: Account | ||
18 | |||
19 | videosCount?: number | ||
20 | viewsPerDay?: ViewsPerDate[] // chronologically ordered | ||
21 | totalViews?: number | ||
22 | |||
23 | banners: ActorImage[] | ||
24 | } | ||
25 | |||
26 | export interface VideoChannelSummary { | ||
27 | id: number | ||
28 | name: string | ||
29 | displayName: string | ||
30 | url: string | ||
31 | host: string | ||
32 | |||
33 | avatars: ActorImage[] | ||
34 | } | ||
diff --git a/shared/models/videos/comment/index.ts b/shared/models/videos/comment/index.ts deleted file mode 100644 index 80c6c0724..000000000 --- a/shared/models/videos/comment/index.ts +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | export * from './video-comment-create.model' | ||
2 | export * from './video-comment.model' | ||
diff --git a/shared/models/videos/comment/video-comment-create.model.ts b/shared/models/videos/comment/video-comment-create.model.ts deleted file mode 100644 index 1f0135405..000000000 --- a/shared/models/videos/comment/video-comment-create.model.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export interface VideoCommentCreate { | ||
2 | text: string | ||
3 | } | ||
diff --git a/shared/models/videos/comment/video-comment.model.ts b/shared/models/videos/comment/video-comment.model.ts deleted file mode 100644 index 737cfe098..000000000 --- a/shared/models/videos/comment/video-comment.model.ts +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | import { ResultList } from '../../common' | ||
2 | import { Account } from '../../actors' | ||
3 | |||
4 | export interface VideoComment { | ||
5 | id: number | ||
6 | url: string | ||
7 | text: string | ||
8 | threadId: number | ||
9 | inReplyToCommentId: number | ||
10 | videoId: number | ||
11 | createdAt: Date | string | ||
12 | updatedAt: Date | string | ||
13 | deletedAt: Date | string | ||
14 | isDeleted: boolean | ||
15 | totalRepliesFromVideoAuthor: number | ||
16 | totalReplies: number | ||
17 | account: Account | ||
18 | } | ||
19 | |||
20 | export interface VideoCommentAdmin { | ||
21 | id: number | ||
22 | url: string | ||
23 | text: string | ||
24 | |||
25 | threadId: number | ||
26 | inReplyToCommentId: number | ||
27 | |||
28 | createdAt: Date | string | ||
29 | updatedAt: Date | string | ||
30 | |||
31 | account: Account | ||
32 | |||
33 | video: { | ||
34 | id: number | ||
35 | uuid: string | ||
36 | name: string | ||
37 | } | ||
38 | } | ||
39 | |||
40 | export type VideoCommentThreads = ResultList<VideoComment> & { totalNotDeletedComments: number } | ||
41 | |||
42 | export interface VideoCommentThreadTree { | ||
43 | comment: VideoComment | ||
44 | children: VideoCommentThreadTree[] | ||
45 | } | ||
diff --git a/shared/models/videos/file/index.ts b/shared/models/videos/file/index.ts deleted file mode 100644 index 78a784a3c..000000000 --- a/shared/models/videos/file/index.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export * from './video-file-metadata.model' | ||
2 | export * from './video-file.model' | ||
3 | export * from './video-resolution.enum' | ||
diff --git a/shared/models/videos/file/video-file-metadata.model.ts b/shared/models/videos/file/video-file-metadata.model.ts deleted file mode 100644 index 8f527c0a7..000000000 --- a/shared/models/videos/file/video-file-metadata.model.ts +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | export class VideoFileMetadata { | ||
2 | streams: { [x: string]: any, [x: number]: any }[] | ||
3 | format: { [x: string]: any, [x: number]: any } | ||
4 | chapters: any[] | ||
5 | |||
6 | constructor (hash: { chapters: any[], format: any, streams: any[] }) { | ||
7 | this.chapters = hash.chapters | ||
8 | this.format = hash.format | ||
9 | this.streams = hash.streams | ||
10 | |||
11 | delete this.format.filename | ||
12 | } | ||
13 | } | ||
diff --git a/shared/models/videos/file/video-file.model.ts b/shared/models/videos/file/video-file.model.ts deleted file mode 100644 index 2bbff48eb..000000000 --- a/shared/models/videos/file/video-file.model.ts +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | import { VideoConstant } from '../video-constant.model' | ||
2 | import { VideoFileMetadata } from './video-file-metadata.model' | ||
3 | import { VideoResolution } from './video-resolution.enum' | ||
4 | |||
5 | export interface VideoFile { | ||
6 | id: number | ||
7 | |||
8 | resolution: VideoConstant<VideoResolution> | ||
9 | size: number // Bytes | ||
10 | |||
11 | torrentUrl: string | ||
12 | torrentDownloadUrl: string | ||
13 | |||
14 | fileUrl: string | ||
15 | fileDownloadUrl: string | ||
16 | |||
17 | fps: number | ||
18 | |||
19 | metadata?: VideoFileMetadata | ||
20 | metadataUrl?: string | ||
21 | |||
22 | magnetUri: string | null | ||
23 | } | ||
diff --git a/shared/models/videos/file/video-resolution.enum.ts b/shared/models/videos/file/video-resolution.enum.ts deleted file mode 100644 index 5b48ad353..000000000 --- a/shared/models/videos/file/video-resolution.enum.ts +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | export const enum VideoResolution { | ||
2 | H_NOVIDEO = 0, | ||
3 | H_144P = 144, | ||
4 | H_240P = 240, | ||
5 | H_360P = 360, | ||
6 | H_480P = 480, | ||
7 | H_720P = 720, | ||
8 | H_1080P = 1080, | ||
9 | H_1440P = 1440, | ||
10 | H_4K = 2160 | ||
11 | } | ||
diff --git a/shared/models/videos/import/index.ts b/shared/models/videos/import/index.ts deleted file mode 100644 index b38a67b5f..000000000 --- a/shared/models/videos/import/index.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export * from './video-import-create.model' | ||
2 | export * from './video-import-state.enum' | ||
3 | export * from './video-import.model' | ||
4 | export * from './videos-import-in-channel-create.model' | ||
diff --git a/shared/models/videos/import/video-import-create.model.ts b/shared/models/videos/import/video-import-create.model.ts deleted file mode 100644 index 425477389..000000000 --- a/shared/models/videos/import/video-import-create.model.ts +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | import { VideoUpdate } from '../video-update.model' | ||
2 | |||
3 | export interface VideoImportCreate extends VideoUpdate { | ||
4 | targetUrl?: string | ||
5 | magnetUri?: string | ||
6 | torrentfile?: Blob | ||
7 | |||
8 | channelId: number // Required | ||
9 | } | ||
diff --git a/shared/models/videos/import/video-import-state.enum.ts b/shared/models/videos/import/video-import-state.enum.ts deleted file mode 100644 index ff5c6beff..000000000 --- a/shared/models/videos/import/video-import-state.enum.ts +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | export const enum VideoImportState { | ||
2 | PENDING = 1, | ||
3 | SUCCESS = 2, | ||
4 | FAILED = 3, | ||
5 | REJECTED = 4, | ||
6 | CANCELLED = 5, | ||
7 | PROCESSING = 6 | ||
8 | } | ||
diff --git a/shared/models/videos/import/video-import.model.ts b/shared/models/videos/import/video-import.model.ts deleted file mode 100644 index 6aed7a91a..000000000 --- a/shared/models/videos/import/video-import.model.ts +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | import { Video } from '../video.model' | ||
2 | import { VideoConstant } from '../video-constant.model' | ||
3 | import { VideoImportState } from './video-import-state.enum' | ||
4 | |||
5 | export interface VideoImport { | ||
6 | id: number | ||
7 | |||
8 | targetUrl: string | ||
9 | magnetUri: string | ||
10 | torrentName: string | ||
11 | |||
12 | createdAt: string | ||
13 | updatedAt: string | ||
14 | originallyPublishedAt?: string | ||
15 | state: VideoConstant<VideoImportState> | ||
16 | error?: string | ||
17 | |||
18 | video?: Video & { tags: string[] } | ||
19 | |||
20 | videoChannelSync?: { | ||
21 | id: number | ||
22 | externalChannelUrl: string | ||
23 | } | ||
24 | } | ||
diff --git a/shared/models/videos/import/videos-import-in-channel-create.model.ts b/shared/models/videos/import/videos-import-in-channel-create.model.ts deleted file mode 100644 index fbfef63f8..000000000 --- a/shared/models/videos/import/videos-import-in-channel-create.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideosImportInChannelCreate { | ||
2 | externalChannelUrl: string | ||
3 | videoChannelSyncId?: number | ||
4 | } | ||
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts deleted file mode 100644 index f8f1ce081..000000000 --- a/shared/models/videos/index.ts +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | export * from './blacklist' | ||
2 | export * from './caption' | ||
3 | export * from './change-ownership' | ||
4 | export * from './channel' | ||
5 | export * from './comment' | ||
6 | export * from './studio' | ||
7 | export * from './live' | ||
8 | export * from './file' | ||
9 | export * from './import' | ||
10 | export * from './playlist' | ||
11 | export * from './rate' | ||
12 | export * from './stats' | ||
13 | export * from './transcoding' | ||
14 | export * from './channel-sync' | ||
15 | |||
16 | export * from './nsfw-policy.type' | ||
17 | |||
18 | export * from './storyboard.model' | ||
19 | export * from './thumbnail.type' | ||
20 | |||
21 | export * from './video-constant.model' | ||
22 | export * from './video-create.model' | ||
23 | |||
24 | export * from './video-privacy.enum' | ||
25 | export * from './video-include.enum' | ||
26 | export * from './video-rate.type' | ||
27 | |||
28 | export * from './video-schedule-update.model' | ||
29 | export * from './video-sort-field.type' | ||
30 | export * from './video-state.enum' | ||
31 | export * from './video-storage.enum' | ||
32 | |||
33 | export * from './video-streaming-playlist.model' | ||
34 | export * from './video-streaming-playlist.type' | ||
35 | |||
36 | export * from './video-token.model' | ||
37 | |||
38 | export * from './video-update.model' | ||
39 | export * from './video-view.model' | ||
40 | export * from './video.model' | ||
41 | export * from './video-create-result.model' | ||
42 | export * from './video-password.model' | ||
diff --git a/shared/models/videos/live/index.ts b/shared/models/videos/live/index.ts deleted file mode 100644 index 07b59fe2c..000000000 --- a/shared/models/videos/live/index.ts +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | export * from './live-video-create.model' | ||
2 | export * from './live-video-error.enum' | ||
3 | export * from './live-video-event-payload.model' | ||
4 | export * from './live-video-event.type' | ||
5 | export * from './live-video-latency-mode.enum' | ||
6 | export * from './live-video-session.model' | ||
7 | export * from './live-video-update.model' | ||
8 | export * from './live-video.model' | ||
diff --git a/shared/models/videos/live/live-video-create.model.ts b/shared/models/videos/live/live-video-create.model.ts deleted file mode 100644 index f8ae9e5a9..000000000 --- a/shared/models/videos/live/live-video-create.model.ts +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | import { VideoCreate } from '../video-create.model' | ||
2 | import { VideoPrivacy } from '../video-privacy.enum' | ||
3 | import { LiveVideoLatencyMode } from './live-video-latency-mode.enum' | ||
4 | |||
5 | export interface LiveVideoCreate extends VideoCreate { | ||
6 | permanentLive?: boolean | ||
7 | latencyMode?: LiveVideoLatencyMode | ||
8 | |||
9 | saveReplay?: boolean | ||
10 | replaySettings?: { privacy: VideoPrivacy } | ||
11 | } | ||
diff --git a/shared/models/videos/live/live-video-error.enum.ts b/shared/models/videos/live/live-video-error.enum.ts deleted file mode 100644 index a26453505..000000000 --- a/shared/models/videos/live/live-video-error.enum.ts +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | export const enum LiveVideoError { | ||
2 | BAD_SOCKET_HEALTH = 1, | ||
3 | DURATION_EXCEEDED = 2, | ||
4 | QUOTA_EXCEEDED = 3, | ||
5 | FFMPEG_ERROR = 4, | ||
6 | BLACKLISTED = 5, | ||
7 | RUNNER_JOB_ERROR = 6, | ||
8 | RUNNER_JOB_CANCEL = 7 | ||
9 | } | ||
diff --git a/shared/models/videos/live/live-video-event-payload.model.ts b/shared/models/videos/live/live-video-event-payload.model.ts deleted file mode 100644 index 646856ac3..000000000 --- a/shared/models/videos/live/live-video-event-payload.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | import { VideoState } from '../video-state.enum' | ||
2 | |||
3 | export interface LiveVideoEventPayload { | ||
4 | state?: VideoState | ||
5 | |||
6 | viewers?: number | ||
7 | } | ||
diff --git a/shared/models/videos/live/live-video-event.type.ts b/shared/models/videos/live/live-video-event.type.ts deleted file mode 100644 index 50f794561..000000000 --- a/shared/models/videos/live/live-video-event.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type LiveVideoEventType = 'state-change' | 'views-change' | ||
diff --git a/shared/models/videos/live/live-video-latency-mode.enum.ts b/shared/models/videos/live/live-video-latency-mode.enum.ts deleted file mode 100644 index 4285e1d41..000000000 --- a/shared/models/videos/live/live-video-latency-mode.enum.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export const enum LiveVideoLatencyMode { | ||
2 | DEFAULT = 1, | ||
3 | HIGH_LATENCY = 2, | ||
4 | SMALL_LATENCY = 3 | ||
5 | } | ||
diff --git a/shared/models/videos/live/live-video-session.model.ts b/shared/models/videos/live/live-video-session.model.ts deleted file mode 100644 index 888c20a8a..000000000 --- a/shared/models/videos/live/live-video-session.model.ts +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | import { VideoPrivacy } from '../video-privacy.enum' | ||
2 | import { LiveVideoError } from './live-video-error.enum' | ||
3 | |||
4 | export interface LiveVideoSession { | ||
5 | id: number | ||
6 | |||
7 | startDate: string | ||
8 | endDate: string | ||
9 | |||
10 | error: LiveVideoError | ||
11 | |||
12 | saveReplay: boolean | ||
13 | endingProcessed: boolean | ||
14 | |||
15 | replaySettings?: { privacy: VideoPrivacy } | ||
16 | |||
17 | replayVideo: { | ||
18 | id: number | ||
19 | uuid: string | ||
20 | shortUUID: string | ||
21 | } | ||
22 | } | ||
diff --git a/shared/models/videos/live/live-video-update.model.ts b/shared/models/videos/live/live-video-update.model.ts deleted file mode 100644 index d6aa6fb37..000000000 --- a/shared/models/videos/live/live-video-update.model.ts +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | import { VideoPrivacy } from '../video-privacy.enum' | ||
2 | import { LiveVideoLatencyMode } from './live-video-latency-mode.enum' | ||
3 | |||
4 | export interface LiveVideoUpdate { | ||
5 | permanentLive?: boolean | ||
6 | saveReplay?: boolean | ||
7 | replaySettings?: { privacy: VideoPrivacy } | ||
8 | latencyMode?: LiveVideoLatencyMode | ||
9 | } | ||
diff --git a/shared/models/videos/live/live-video.model.ts b/shared/models/videos/live/live-video.model.ts deleted file mode 100644 index fd8454123..000000000 --- a/shared/models/videos/live/live-video.model.ts +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | import { VideoPrivacy } from '../video-privacy.enum' | ||
2 | import { LiveVideoLatencyMode } from './live-video-latency-mode.enum' | ||
3 | |||
4 | export interface LiveVideo { | ||
5 | // If owner | ||
6 | rtmpUrl?: string | ||
7 | rtmpsUrl?: string | ||
8 | streamKey?: string | ||
9 | |||
10 | saveReplay: boolean | ||
11 | replaySettings?: { privacy: VideoPrivacy } | ||
12 | permanentLive: boolean | ||
13 | latencyMode: LiveVideoLatencyMode | ||
14 | } | ||
diff --git a/shared/models/videos/nsfw-policy.type.ts b/shared/models/videos/nsfw-policy.type.ts deleted file mode 100644 index dc0032a14..000000000 --- a/shared/models/videos/nsfw-policy.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type NSFWPolicyType = 'do_not_list' | 'blur' | 'display' | ||
diff --git a/shared/models/videos/playlist/index.ts b/shared/models/videos/playlist/index.ts deleted file mode 100644 index a9e8ce496..000000000 --- a/shared/models/videos/playlist/index.ts +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | export * from './video-exist-in-playlist.model' | ||
2 | export * from './video-playlist-create-result.model' | ||
3 | export * from './video-playlist-create.model' | ||
4 | export * from './video-playlist-element-create-result.model' | ||
5 | export * from './video-playlist-element-create.model' | ||
6 | export * from './video-playlist-element-update.model' | ||
7 | export * from './video-playlist-element.model' | ||
8 | export * from './video-playlist-privacy.model' | ||
9 | export * from './video-playlist-reorder.model' | ||
10 | export * from './video-playlist-type.model' | ||
11 | export * from './video-playlist-update.model' | ||
12 | export * from './video-playlist.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 deleted file mode 100644 index 6d06c0f4d..000000000 --- a/shared/models/videos/playlist/video-exist-in-playlist.model.ts +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | export type VideosExistInPlaylists = { | ||
2 | [videoId: number]: VideoExistInPlaylist[] | ||
3 | } | ||
4 | export type CachedVideosExistInPlaylists = { | ||
5 | [videoId: number]: CachedVideoExistInPlaylist[] | ||
6 | } | ||
7 | |||
8 | export type CachedVideoExistInPlaylist = { | ||
9 | playlistElementId: number | ||
10 | playlistId: number | ||
11 | startTimestamp?: number | ||
12 | stopTimestamp?: number | ||
13 | } | ||
14 | |||
15 | export type VideoExistInPlaylist = CachedVideoExistInPlaylist & { | ||
16 | playlistDisplayName: string | ||
17 | playlistShortUUID: string | ||
18 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-create-result.model.ts b/shared/models/videos/playlist/video-playlist-create-result.model.ts deleted file mode 100644 index cd9b170ae..000000000 --- a/shared/models/videos/playlist/video-playlist-create-result.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export interface VideoPlaylistCreateResult { | ||
2 | id: number | ||
3 | uuid: string | ||
4 | shortUUID: string | ||
5 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-create.model.ts b/shared/models/videos/playlist/video-playlist-create.model.ts deleted file mode 100644 index 67a33fa35..000000000 --- a/shared/models/videos/playlist/video-playlist-create.model.ts +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | import { VideoPlaylistPrivacy } from './video-playlist-privacy.model' | ||
2 | |||
3 | export interface VideoPlaylistCreate { | ||
4 | displayName: string | ||
5 | privacy: VideoPlaylistPrivacy | ||
6 | |||
7 | description?: string | ||
8 | videoChannelId?: number | ||
9 | |||
10 | thumbnailfile?: any | ||
11 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-element-create-result.model.ts b/shared/models/videos/playlist/video-playlist-element-create-result.model.ts deleted file mode 100644 index dc475e7d8..000000000 --- a/shared/models/videos/playlist/video-playlist-element-create-result.model.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export interface VideoPlaylistElementCreateResult { | ||
2 | id: number | ||
3 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-element-create.model.ts b/shared/models/videos/playlist/video-playlist-element-create.model.ts deleted file mode 100644 index c31702892..000000000 --- a/shared/models/videos/playlist/video-playlist-element-create.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export interface VideoPlaylistElementCreate { | ||
2 | videoId: number | ||
3 | |||
4 | startTimestamp?: number | ||
5 | stopTimestamp?: number | ||
6 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-element-update.model.ts b/shared/models/videos/playlist/video-playlist-element-update.model.ts deleted file mode 100644 index 15a30fbdc..000000000 --- a/shared/models/videos/playlist/video-playlist-element-update.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoPlaylistElementUpdate { | ||
2 | startTimestamp?: number | ||
3 | stopTimestamp?: number | ||
4 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-element.model.ts b/shared/models/videos/playlist/video-playlist-element.model.ts deleted file mode 100644 index df9e3b5cf..000000000 --- a/shared/models/videos/playlist/video-playlist-element.model.ts +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | import { Video } from '../video.model' | ||
2 | |||
3 | export const 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/playlist/video-playlist-privacy.model.ts b/shared/models/videos/playlist/video-playlist-privacy.model.ts deleted file mode 100644 index 480e1f104..000000000 --- a/shared/models/videos/playlist/video-playlist-privacy.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export const enum VideoPlaylistPrivacy { | ||
2 | PUBLIC = 1, | ||
3 | UNLISTED = 2, | ||
4 | PRIVATE = 3 | ||
5 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-reorder.model.ts b/shared/models/videos/playlist/video-playlist-reorder.model.ts deleted file mode 100644 index 63ec714c5..000000000 --- a/shared/models/videos/playlist/video-playlist-reorder.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export interface VideoPlaylistReorder { | ||
2 | startPosition: number | ||
3 | insertAfterPosition: number | ||
4 | reorderLength?: number | ||
5 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-type.model.ts b/shared/models/videos/playlist/video-playlist-type.model.ts deleted file mode 100644 index 7f51a6354..000000000 --- a/shared/models/videos/playlist/video-playlist-type.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export const enum VideoPlaylistType { | ||
2 | REGULAR = 1, | ||
3 | WATCH_LATER = 2 | ||
4 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist-update.model.ts b/shared/models/videos/playlist/video-playlist-update.model.ts deleted file mode 100644 index a6a3f74d9..000000000 --- a/shared/models/videos/playlist/video-playlist-update.model.ts +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | import { VideoPlaylistPrivacy } from './video-playlist-privacy.model' | ||
2 | |||
3 | export interface VideoPlaylistUpdate { | ||
4 | displayName?: string | ||
5 | privacy?: VideoPlaylistPrivacy | ||
6 | |||
7 | description?: string | ||
8 | videoChannelId?: number | ||
9 | thumbnailfile?: any | ||
10 | } | ||
diff --git a/shared/models/videos/playlist/video-playlist.model.ts b/shared/models/videos/playlist/video-playlist.model.ts deleted file mode 100644 index b8a9955d9..000000000 --- a/shared/models/videos/playlist/video-playlist.model.ts +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | import { AccountSummary } from '../../actors/index' | ||
2 | import { VideoChannelSummary, VideoConstant } from '..' | ||
3 | import { VideoPlaylistPrivacy } from './video-playlist-privacy.model' | ||
4 | import { VideoPlaylistType } from './video-playlist-type.model' | ||
5 | |||
6 | export interface VideoPlaylist { | ||
7 | id: number | ||
8 | uuid: string | ||
9 | shortUUID: string | ||
10 | |||
11 | isLocal: boolean | ||
12 | |||
13 | url: string | ||
14 | |||
15 | displayName: string | ||
16 | description: string | ||
17 | privacy: VideoConstant<VideoPlaylistPrivacy> | ||
18 | |||
19 | thumbnailPath: string | ||
20 | thumbnailUrl?: string | ||
21 | |||
22 | videosLength: number | ||
23 | |||
24 | type: VideoConstant<VideoPlaylistType> | ||
25 | |||
26 | embedPath: string | ||
27 | embedUrl?: string | ||
28 | |||
29 | createdAt: Date | string | ||
30 | updatedAt: Date | string | ||
31 | |||
32 | ownerAccount: AccountSummary | ||
33 | videoChannel?: VideoChannelSummary | ||
34 | } | ||
diff --git a/shared/models/videos/rate/account-video-rate.model.ts b/shared/models/videos/rate/account-video-rate.model.ts deleted file mode 100644 index e789367dc..000000000 --- a/shared/models/videos/rate/account-video-rate.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | import { UserVideoRateType } from './user-video-rate.type' | ||
2 | import { Video } from '../video.model' | ||
3 | |||
4 | export interface AccountVideoRate { | ||
5 | video: Video | ||
6 | rating: UserVideoRateType | ||
7 | } | ||
diff --git a/shared/models/videos/rate/index.ts b/shared/models/videos/rate/index.ts deleted file mode 100644 index 06aa691bd..000000000 --- a/shared/models/videos/rate/index.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | |||
2 | export * from './user-video-rate-update.model' | ||
3 | export * from './user-video-rate.model' | ||
4 | export * from './account-video-rate.model' | ||
5 | export * from './user-video-rate.type' | ||
diff --git a/shared/models/videos/rate/user-video-rate-update.model.ts b/shared/models/videos/rate/user-video-rate-update.model.ts deleted file mode 100644 index 85e89271a..000000000 --- a/shared/models/videos/rate/user-video-rate-update.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | import { UserVideoRateType } from './user-video-rate.type' | ||
2 | |||
3 | export interface UserVideoRateUpdate { | ||
4 | rating: UserVideoRateType | ||
5 | } | ||
diff --git a/shared/models/videos/rate/user-video-rate.model.ts b/shared/models/videos/rate/user-video-rate.model.ts deleted file mode 100644 index d39a1c3d5..000000000 --- a/shared/models/videos/rate/user-video-rate.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | import { UserVideoRateType } from './user-video-rate.type' | ||
2 | |||
3 | export interface UserVideoRate { | ||
4 | videoId: number | ||
5 | rating: UserVideoRateType | ||
6 | } | ||
diff --git a/shared/models/videos/rate/user-video-rate.type.ts b/shared/models/videos/rate/user-video-rate.type.ts deleted file mode 100644 index a4d9c7e39..000000000 --- a/shared/models/videos/rate/user-video-rate.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type UserVideoRateType = 'like' | 'dislike' | 'none' | ||
diff --git a/shared/models/videos/stats/index.ts b/shared/models/videos/stats/index.ts deleted file mode 100644 index a9b203f58..000000000 --- a/shared/models/videos/stats/index.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export * from './video-stats-overall-query.model' | ||
2 | export * from './video-stats-overall.model' | ||
3 | export * from './video-stats-retention.model' | ||
4 | export * from './video-stats-timeserie-query.model' | ||
5 | export * from './video-stats-timeserie-metric.type' | ||
6 | export * from './video-stats-timeserie.model' | ||
diff --git a/shared/models/videos/stats/video-stats-overall-query.model.ts b/shared/models/videos/stats/video-stats-overall-query.model.ts deleted file mode 100644 index 6b4c2164f..000000000 --- a/shared/models/videos/stats/video-stats-overall-query.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoStatsOverallQuery { | ||
2 | startDate?: string | ||
3 | endDate?: string | ||
4 | } | ||
diff --git a/shared/models/videos/stats/video-stats-overall.model.ts b/shared/models/videos/stats/video-stats-overall.model.ts deleted file mode 100644 index 54b57798f..000000000 --- a/shared/models/videos/stats/video-stats-overall.model.ts +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | export interface VideoStatsOverall { | ||
2 | averageWatchTime: number | ||
3 | totalWatchTime: number | ||
4 | |||
5 | totalViewers: number | ||
6 | |||
7 | viewersPeak: number | ||
8 | viewersPeakDate: string | ||
9 | |||
10 | countries: { | ||
11 | isoCode: string | ||
12 | viewers: number | ||
13 | }[] | ||
14 | } | ||
diff --git a/shared/models/videos/stats/video-stats-retention.model.ts b/shared/models/videos/stats/video-stats-retention.model.ts deleted file mode 100644 index e494888ed..000000000 --- a/shared/models/videos/stats/video-stats-retention.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export interface VideoStatsRetention { | ||
2 | data: { | ||
3 | second: number | ||
4 | retentionPercent: number | ||
5 | }[] | ||
6 | } | ||
diff --git a/shared/models/videos/stats/video-stats-timeserie-metric.type.ts b/shared/models/videos/stats/video-stats-timeserie-metric.type.ts deleted file mode 100644 index fc268d083..000000000 --- a/shared/models/videos/stats/video-stats-timeserie-metric.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type VideoStatsTimeserieMetric = 'viewers' | 'aggregateWatchTime' | ||
diff --git a/shared/models/videos/stats/video-stats-timeserie-query.model.ts b/shared/models/videos/stats/video-stats-timeserie-query.model.ts deleted file mode 100644 index f3a8430e1..000000000 --- a/shared/models/videos/stats/video-stats-timeserie-query.model.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoStatsTimeserieQuery { | ||
2 | startDate?: string | ||
3 | endDate?: string | ||
4 | } | ||
diff --git a/shared/models/videos/stats/video-stats-timeserie.model.ts b/shared/models/videos/stats/video-stats-timeserie.model.ts deleted file mode 100644 index 4a0e208df..000000000 --- a/shared/models/videos/stats/video-stats-timeserie.model.ts +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | export interface VideoStatsTimeserie { | ||
2 | groupInterval: string | ||
3 | |||
4 | data: { | ||
5 | date: string | ||
6 | value: number | ||
7 | }[] | ||
8 | } | ||
diff --git a/shared/models/videos/storyboard.model.ts b/shared/models/videos/storyboard.model.ts deleted file mode 100644 index c92c81f09..000000000 --- a/shared/models/videos/storyboard.model.ts +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | export interface Storyboard { | ||
2 | storyboardPath: string | ||
3 | |||
4 | totalHeight: number | ||
5 | totalWidth: number | ||
6 | |||
7 | spriteHeight: number | ||
8 | spriteWidth: number | ||
9 | |||
10 | spriteDuration: number | ||
11 | } | ||
diff --git a/shared/models/videos/studio/index.ts b/shared/models/videos/studio/index.ts deleted file mode 100644 index a1eb98a49..000000000 --- a/shared/models/videos/studio/index.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export * from './video-studio-create-edit.model' | ||
diff --git a/shared/models/videos/studio/video-studio-create-edit.model.ts b/shared/models/videos/studio/video-studio-create-edit.model.ts deleted file mode 100644 index 5e8296dc9..000000000 --- a/shared/models/videos/studio/video-studio-create-edit.model.ts +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | export interface VideoStudioCreateEdition { | ||
2 | tasks: VideoStudioTask[] | ||
3 | } | ||
4 | |||
5 | export type VideoStudioTask = | ||
6 | VideoStudioTaskCut | | ||
7 | VideoStudioTaskIntro | | ||
8 | VideoStudioTaskOutro | | ||
9 | VideoStudioTaskWatermark | ||
10 | |||
11 | export interface VideoStudioTaskCut { | ||
12 | name: 'cut' | ||
13 | |||
14 | options: { | ||
15 | start?: number | ||
16 | end?: number | ||
17 | } | ||
18 | } | ||
19 | |||
20 | export interface VideoStudioTaskIntro { | ||
21 | name: 'add-intro' | ||
22 | |||
23 | options: { | ||
24 | file: Blob | string | ||
25 | } | ||
26 | } | ||
27 | |||
28 | export interface VideoStudioTaskOutro { | ||
29 | name: 'add-outro' | ||
30 | |||
31 | options: { | ||
32 | file: Blob | string | ||
33 | } | ||
34 | } | ||
35 | |||
36 | export interface VideoStudioTaskWatermark { | ||
37 | name: 'add-watermark' | ||
38 | |||
39 | options: { | ||
40 | file: Blob | string | ||
41 | } | ||
42 | } | ||
43 | |||
44 | // --------------------------------------------------------------------------- | ||
45 | |||
46 | export function isVideoStudioTaskIntro (v: VideoStudioTask): v is VideoStudioTaskIntro { | ||
47 | return v.name === 'add-intro' | ||
48 | } | ||
49 | |||
50 | export function isVideoStudioTaskOutro (v: VideoStudioTask): v is VideoStudioTaskOutro { | ||
51 | return v.name === 'add-outro' | ||
52 | } | ||
53 | |||
54 | export function isVideoStudioTaskWatermark (v: VideoStudioTask): v is VideoStudioTaskWatermark { | ||
55 | return v.name === 'add-watermark' | ||
56 | } | ||
57 | |||
58 | export function hasVideoStudioTaskFile (v: VideoStudioTask): v is VideoStudioTaskIntro | VideoStudioTaskOutro | VideoStudioTaskWatermark { | ||
59 | return isVideoStudioTaskIntro(v) || isVideoStudioTaskOutro(v) || isVideoStudioTaskWatermark(v) | ||
60 | } | ||
diff --git a/shared/models/videos/thumbnail.type.ts b/shared/models/videos/thumbnail.type.ts deleted file mode 100644 index 6907b2802..000000000 --- a/shared/models/videos/thumbnail.type.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export const enum ThumbnailType { | ||
2 | MINIATURE = 1, | ||
3 | PREVIEW = 2 | ||
4 | } | ||
diff --git a/shared/models/videos/transcoding/index.ts b/shared/models/videos/transcoding/index.ts deleted file mode 100644 index 14472d900..000000000 --- a/shared/models/videos/transcoding/index.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export * from './video-transcoding-create.model' | ||
2 | export * from './video-transcoding-fps.model' | ||
3 | export * from './video-transcoding.model' | ||
diff --git a/shared/models/videos/transcoding/video-transcoding-create.model.ts b/shared/models/videos/transcoding/video-transcoding-create.model.ts deleted file mode 100644 index 6c2dbefa6..000000000 --- a/shared/models/videos/transcoding/video-transcoding-create.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export interface VideoTranscodingCreate { | ||
2 | transcodingType: 'hls' | 'webtorrent' | 'web-video' // TODO: remove webtorrent in v7 | ||
3 | |||
4 | forceTranscoding?: boolean // Default false | ||
5 | } | ||
diff --git a/shared/models/videos/transcoding/video-transcoding-fps.model.ts b/shared/models/videos/transcoding/video-transcoding-fps.model.ts deleted file mode 100644 index 9a330ac94..000000000 --- a/shared/models/videos/transcoding/video-transcoding-fps.model.ts +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | export type VideoTranscodingFPS = { | ||
2 | MIN: number | ||
3 | STANDARD: number[] | ||
4 | HD_STANDARD: number[] | ||
5 | AUDIO_MERGE: number | ||
6 | AVERAGE: number | ||
7 | MAX: number | ||
8 | KEEP_ORIGIN_FPS_RESOLUTION_MIN: number | ||
9 | } | ||
diff --git a/shared/models/videos/transcoding/video-transcoding.model.ts b/shared/models/videos/transcoding/video-transcoding.model.ts deleted file mode 100644 index 91eacf8dc..000000000 --- a/shared/models/videos/transcoding/video-transcoding.model.ts +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | import { VideoResolution } from '../file/video-resolution.enum' | ||
2 | |||
3 | // Types used by plugins and ffmpeg-utils | ||
4 | |||
5 | export type EncoderOptionsBuilderParams = { | ||
6 | input: string | ||
7 | |||
8 | resolution: VideoResolution | ||
9 | |||
10 | // If PeerTube applies a filter, transcoding profile must not copy input stream | ||
11 | canCopyAudio: boolean | ||
12 | canCopyVideo: boolean | ||
13 | |||
14 | fps: number | ||
15 | |||
16 | // Could be undefined if we could not get input bitrate (some RTMP streams for example) | ||
17 | inputBitrate: number | ||
18 | inputRatio: number | ||
19 | |||
20 | // For lives | ||
21 | streamNum?: number | ||
22 | } | ||
23 | |||
24 | export type EncoderOptionsBuilder = (params: EncoderOptionsBuilderParams) => Promise<EncoderOptions> | EncoderOptions | ||
25 | |||
26 | export interface EncoderOptions { | ||
27 | copy?: boolean // Copy stream? Default to false | ||
28 | |||
29 | scaleFilter?: { | ||
30 | name: string | ||
31 | } | ||
32 | |||
33 | inputOptions?: string[] | ||
34 | outputOptions?: string[] | ||
35 | } | ||
36 | |||
37 | // All our encoders | ||
38 | |||
39 | export interface EncoderProfile <T> { | ||
40 | [ profile: string ]: T | ||
41 | |||
42 | default: T | ||
43 | } | ||
44 | |||
45 | export type AvailableEncoders = { | ||
46 | available: { | ||
47 | live: { | ||
48 | [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder> | ||
49 | } | ||
50 | |||
51 | vod: { | ||
52 | [ encoder: string ]: EncoderProfile<EncoderOptionsBuilder> | ||
53 | } | ||
54 | } | ||
55 | |||
56 | encodersToTry: { | ||
57 | vod: { | ||
58 | video: string[] | ||
59 | audio: string[] | ||
60 | } | ||
61 | |||
62 | live: { | ||
63 | video: string[] | ||
64 | audio: string[] | ||
65 | } | ||
66 | } | ||
67 | } | ||
diff --git a/shared/models/videos/video-constant.model.ts b/shared/models/videos/video-constant.model.ts deleted file mode 100644 index 353a29535..000000000 --- a/shared/models/videos/video-constant.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export interface VideoConstant<T> { | ||
2 | id: T | ||
3 | label: string | ||
4 | description?: string | ||
5 | } | ||
diff --git a/shared/models/videos/video-create-result.model.ts b/shared/models/videos/video-create-result.model.ts deleted file mode 100644 index a9f8e25a0..000000000 --- a/shared/models/videos/video-create-result.model.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | export interface VideoCreateResult { | ||
2 | id: number | ||
3 | uuid: string | ||
4 | shortUUID: string | ||
5 | } | ||
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts deleted file mode 100644 index 7a34b5afe..000000000 --- a/shared/models/videos/video-create.model.ts +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | import { VideoPrivacy } from './video-privacy.enum' | ||
2 | import { VideoScheduleUpdate } from './video-schedule-update.model' | ||
3 | |||
4 | export interface VideoCreate { | ||
5 | name: string | ||
6 | channelId: number | ||
7 | |||
8 | category?: number | ||
9 | licence?: number | ||
10 | language?: string | ||
11 | description?: string | ||
12 | support?: string | ||
13 | nsfw?: boolean | ||
14 | waitTranscoding?: boolean | ||
15 | tags?: string[] | ||
16 | commentsEnabled?: boolean | ||
17 | downloadEnabled?: boolean | ||
18 | privacy: VideoPrivacy | ||
19 | scheduleUpdate?: VideoScheduleUpdate | ||
20 | originallyPublishedAt?: Date | string | ||
21 | videoPasswords?: string[] | ||
22 | |||
23 | thumbnailfile?: Blob | string | ||
24 | previewfile?: Blob | string | ||
25 | } | ||
diff --git a/shared/models/videos/video-include.enum.ts b/shared/models/videos/video-include.enum.ts deleted file mode 100644 index 32ee12e86..000000000 --- a/shared/models/videos/video-include.enum.ts +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | export const enum VideoInclude { | ||
2 | NONE = 0, | ||
3 | NOT_PUBLISHED_STATE = 1 << 0, | ||
4 | BLACKLISTED = 1 << 1, | ||
5 | BLOCKED_OWNER = 1 << 2, | ||
6 | FILES = 1 << 3, | ||
7 | CAPTIONS = 1 << 4 | ||
8 | } | ||
diff --git a/shared/models/videos/video-password.model.ts b/shared/models/videos/video-password.model.ts deleted file mode 100644 index c0280b9b9..000000000 --- a/shared/models/videos/video-password.model.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | export interface VideoPassword { | ||
2 | id: number | ||
3 | password: string | ||
4 | videoId: number | ||
5 | createdAt: Date | string | ||
6 | updatedAt: Date | string | ||
7 | } | ||
diff --git a/shared/models/videos/video-privacy.enum.ts b/shared/models/videos/video-privacy.enum.ts deleted file mode 100644 index 12e1d196f..000000000 --- a/shared/models/videos/video-privacy.enum.ts +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | export const enum VideoPrivacy { | ||
2 | PUBLIC = 1, | ||
3 | UNLISTED = 2, | ||
4 | PRIVATE = 3, | ||
5 | INTERNAL = 4, | ||
6 | PASSWORD_PROTECTED = 5 | ||
7 | } | ||
diff --git a/shared/models/videos/video-rate.type.ts b/shared/models/videos/video-rate.type.ts deleted file mode 100644 index d48774a4b..000000000 --- a/shared/models/videos/video-rate.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type VideoRateType = 'like' | 'dislike' | ||
diff --git a/shared/models/videos/video-schedule-update.model.ts b/shared/models/videos/video-schedule-update.model.ts deleted file mode 100644 index 87d74f654..000000000 --- a/shared/models/videos/video-schedule-update.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | import { VideoPrivacy } from './video-privacy.enum' | ||
2 | |||
3 | export interface VideoScheduleUpdate { | ||
4 | updateAt: Date | string | ||
5 | privacy?: VideoPrivacy.PUBLIC | VideoPrivacy.UNLISTED | VideoPrivacy.INTERNAL // Cannot schedule an update to PRIVATE | ||
6 | } | ||
diff --git a/shared/models/videos/video-sort-field.type.ts b/shared/models/videos/video-sort-field.type.ts deleted file mode 100644 index 7fa07fa73..000000000 --- a/shared/models/videos/video-sort-field.type.ts +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | export type VideoSortField = | ||
2 | 'name' | '-name' | | ||
3 | 'duration' | '-duration' | | ||
4 | 'publishedAt' | '-publishedAt' | | ||
5 | 'originallyPublishedAt' | '-originallyPublishedAt' | | ||
6 | 'createdAt' | '-createdAt' | | ||
7 | 'views' | '-views' | | ||
8 | 'likes' | '-likes' | | ||
9 | |||
10 | // trending sorts | ||
11 | 'trending' | '-trending' | | ||
12 | 'hot' | '-hot' | | ||
13 | 'best' | '-best' | ||
diff --git a/shared/models/videos/video-source.ts b/shared/models/videos/video-source.ts deleted file mode 100644 index bf4ad2453..000000000 --- a/shared/models/videos/video-source.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export interface VideoSource { | ||
2 | filename: string | ||
3 | createdAt: string | Date | ||
4 | } | ||
diff --git a/shared/models/videos/video-state.enum.ts b/shared/models/videos/video-state.enum.ts deleted file mode 100644 index e45e4adc2..000000000 --- a/shared/models/videos/video-state.enum.ts +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | export const enum VideoState { | ||
2 | PUBLISHED = 1, | ||
3 | TO_TRANSCODE = 2, | ||
4 | TO_IMPORT = 3, | ||
5 | WAITING_FOR_LIVE = 4, | ||
6 | LIVE_ENDED = 5, | ||
7 | TO_MOVE_TO_EXTERNAL_STORAGE = 6, | ||
8 | TRANSCODING_FAILED = 7, | ||
9 | TO_MOVE_TO_EXTERNAL_STORAGE_FAILED = 8, | ||
10 | TO_EDIT = 9 | ||
11 | } | ||
diff --git a/shared/models/videos/video-storage.enum.ts b/shared/models/videos/video-storage.enum.ts deleted file mode 100644 index 7c6690db2..000000000 --- a/shared/models/videos/video-storage.enum.ts +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | export const enum VideoStorage { | ||
2 | FILE_SYSTEM, | ||
3 | OBJECT_STORAGE, | ||
4 | } | ||
diff --git a/shared/models/videos/video-streaming-playlist.model.ts b/shared/models/videos/video-streaming-playlist.model.ts deleted file mode 100644 index 11919a4ee..000000000 --- a/shared/models/videos/video-streaming-playlist.model.ts +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | import { VideoStreamingPlaylistType } from './video-streaming-playlist.type' | ||
2 | import { VideoFile } from './file' | ||
3 | |||
4 | export interface VideoStreamingPlaylist { | ||
5 | id: number | ||
6 | type: VideoStreamingPlaylistType | ||
7 | playlistUrl: string | ||
8 | segmentsSha256Url: string | ||
9 | |||
10 | redundancies: { | ||
11 | baseUrl: string | ||
12 | }[] | ||
13 | |||
14 | files: VideoFile[] | ||
15 | } | ||
diff --git a/shared/models/videos/video-streaming-playlist.type.ts b/shared/models/videos/video-streaming-playlist.type.ts deleted file mode 100644 index e2e2b93ea..000000000 --- a/shared/models/videos/video-streaming-playlist.type.ts +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | export const enum VideoStreamingPlaylistType { | ||
2 | HLS = 1 | ||
3 | } | ||
diff --git a/shared/models/videos/video-token.model.ts b/shared/models/videos/video-token.model.ts deleted file mode 100644 index aefea565f..000000000 --- a/shared/models/videos/video-token.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export interface VideoToken { | ||
2 | files: { | ||
3 | token: string | ||
4 | expires: string | Date | ||
5 | } | ||
6 | } | ||
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts deleted file mode 100644 index 43537b5af..000000000 --- a/shared/models/videos/video-update.model.ts +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | import { VideoPrivacy } from './video-privacy.enum' | ||
2 | import { VideoScheduleUpdate } from './video-schedule-update.model' | ||
3 | |||
4 | export interface VideoUpdate { | ||
5 | name?: string | ||
6 | category?: number | ||
7 | licence?: number | ||
8 | language?: string | ||
9 | description?: string | ||
10 | support?: string | ||
11 | privacy?: VideoPrivacy | ||
12 | tags?: string[] | ||
13 | commentsEnabled?: boolean | ||
14 | downloadEnabled?: boolean | ||
15 | nsfw?: boolean | ||
16 | waitTranscoding?: boolean | ||
17 | channelId?: number | ||
18 | thumbnailfile?: Blob | ||
19 | previewfile?: Blob | ||
20 | scheduleUpdate?: VideoScheduleUpdate | ||
21 | originallyPublishedAt?: Date | string | ||
22 | videoPasswords?: string[] | ||
23 | |||
24 | pluginData?: any | ||
25 | } | ||
diff --git a/shared/models/videos/video-view.model.ts b/shared/models/videos/video-view.model.ts deleted file mode 100644 index f61211104..000000000 --- a/shared/models/videos/video-view.model.ts +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | export type VideoViewEvent = 'seek' | ||
2 | |||
3 | export interface VideoView { | ||
4 | currentTime: number | ||
5 | viewEvent?: VideoViewEvent | ||
6 | } | ||
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts deleted file mode 100644 index 7e5930067..000000000 --- a/shared/models/videos/video.model.ts +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | import { Account, AccountSummary } from '../actors' | ||
2 | import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model' | ||
3 | import { VideoFile } from './file' | ||
4 | import { VideoConstant } from './video-constant.model' | ||
5 | import { VideoPrivacy } from './video-privacy.enum' | ||
6 | import { VideoScheduleUpdate } from './video-schedule-update.model' | ||
7 | import { VideoState } from './video-state.enum' | ||
8 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' | ||
9 | |||
10 | export interface Video extends Partial<VideoAdditionalAttributes> { | ||
11 | id: number | ||
12 | uuid: string | ||
13 | shortUUID: string | ||
14 | |||
15 | createdAt: Date | string | ||
16 | updatedAt: Date | string | ||
17 | publishedAt: Date | string | ||
18 | originallyPublishedAt: Date | string | ||
19 | category: VideoConstant<number> | ||
20 | licence: VideoConstant<number> | ||
21 | language: VideoConstant<string> | ||
22 | privacy: VideoConstant<VideoPrivacy> | ||
23 | |||
24 | // Deprecated in 5.0 in favour of truncatedDescription | ||
25 | description: string | ||
26 | truncatedDescription: string | ||
27 | |||
28 | duration: number | ||
29 | isLocal: boolean | ||
30 | name: string | ||
31 | |||
32 | isLive: boolean | ||
33 | |||
34 | thumbnailPath: string | ||
35 | thumbnailUrl?: string | ||
36 | |||
37 | previewPath: string | ||
38 | previewUrl?: string | ||
39 | |||
40 | embedPath: string | ||
41 | embedUrl?: string | ||
42 | |||
43 | url: string | ||
44 | |||
45 | views: number | ||
46 | viewers: number | ||
47 | |||
48 | likes: number | ||
49 | dislikes: number | ||
50 | nsfw: boolean | ||
51 | |||
52 | account: AccountSummary | ||
53 | channel: VideoChannelSummary | ||
54 | |||
55 | userHistory?: { | ||
56 | currentTime: number | ||
57 | } | ||
58 | |||
59 | pluginData?: any | ||
60 | } | ||
61 | |||
62 | // Not included by default, needs query params | ||
63 | export interface VideoAdditionalAttributes { | ||
64 | waitTranscoding: boolean | ||
65 | state: VideoConstant<VideoState> | ||
66 | scheduledUpdate: VideoScheduleUpdate | ||
67 | |||
68 | blacklisted: boolean | ||
69 | blacklistedReason: string | ||
70 | |||
71 | blockedOwner: boolean | ||
72 | blockedServer: boolean | ||
73 | |||
74 | files: VideoFile[] | ||
75 | streamingPlaylists: VideoStreamingPlaylist[] | ||
76 | } | ||
77 | |||
78 | export interface VideoDetails extends Video { | ||
79 | // Deprecated in 5.0 | ||
80 | descriptionPath: string | ||
81 | |||
82 | support: string | ||
83 | channel: VideoChannel | ||
84 | account: Account | ||
85 | tags: string[] | ||
86 | commentsEnabled: boolean | ||
87 | downloadEnabled: boolean | ||
88 | |||
89 | // Not optional in details (unlike in parent Video) | ||
90 | waitTranscoding: boolean | ||
91 | state: VideoConstant<VideoState> | ||
92 | |||
93 | trackerUrls: string[] | ||
94 | |||
95 | files: VideoFile[] | ||
96 | streamingPlaylists: VideoStreamingPlaylist[] | ||
97 | |||
98 | inputFileUpdatedAt: string | Date | ||
99 | } | ||