aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/import
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/videos/import')
-rw-r--r--shared/models/videos/import/video-import-create.model.ts9
-rw-r--r--shared/models/videos/import/video-import-state.enum.ts5
-rw-r--r--shared/models/videos/import/video-import.model.ts18
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 @@
1import { VideoUpdate } from '../video-update.model'
2
3export 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 @@
1export 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 @@
1import { Video } from '../video.model'
2import { VideoConstant } from '../video-constant.model'
3import { VideoImportState } from './video-import-state.enum'
4
5export 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}