diff options
Diffstat (limited to 'shared/models/videos/import')
-rw-r--r-- | shared/models/videos/import/video-import-create.model.ts | 9 | ||||
-rw-r--r-- | shared/models/videos/import/video-import-state.enum.ts | 5 | ||||
-rw-r--r-- | shared/models/videos/import/video-import.model.ts | 18 |
3 files changed, 32 insertions, 0 deletions
diff --git a/shared/models/videos/import/video-import-create.model.ts b/shared/models/videos/import/video-import-create.model.ts new file mode 100644 index 000000000..425477389 --- /dev/null +++ b/shared/models/videos/import/video-import-create.model.ts | |||
@@ -0,0 +1,9 @@ | |||
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 new file mode 100644 index 000000000..b178fbf3a --- /dev/null +++ b/shared/models/videos/import/video-import-state.enum.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export enum VideoImportState { | ||
2 | PENDING = 1, | ||
3 | SUCCESS = 2, | ||
4 | FAILED = 3 | ||
5 | } | ||
diff --git a/shared/models/videos/import/video-import.model.ts b/shared/models/videos/import/video-import.model.ts new file mode 100644 index 000000000..e2a56617d --- /dev/null +++ b/shared/models/videos/import/video-import.model.ts | |||
@@ -0,0 +1,18 @@ | |||
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 | state: VideoConstant<VideoImportState> | ||
15 | error?: string | ||
16 | |||
17 | video?: Video & { tags: string[] } | ||
18 | } | ||