aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/import
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-14 14:59:53 +0200
committerChocobozzz <me@florianbigard.com>2018-08-14 15:00:01 +0200
commit59c76ffa8f503e962d517c78f033f1beccb1de1a (patch)
treed567991b10cffd59322dd679d5188e7d1ec7ddce /shared/models/videos/import
parent13b6dc1f3437560c55a5dfc3a94a2b162654e5c9 (diff)
downloadPeerTube-59c76ffa8f503e962d517c78f033f1beccb1de1a.tar.gz
PeerTube-59c76ffa8f503e962d517c78f033f1beccb1de1a.tar.zst
PeerTube-59c76ffa8f503e962d517c78f033f1beccb1de1a.zip
Flat shared module directory
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}