aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands')
-rw-r--r--shared/server-commands/videos/imports-command.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared/server-commands/videos/imports-command.ts b/shared/server-commands/videos/imports-command.ts
index 07d810ec1..e307a79be 100644
--- a/shared/server-commands/videos/imports-command.ts
+++ b/shared/server-commands/videos/imports-command.ts
@@ -7,13 +7,15 @@ import { AbstractCommand, OverrideCommandOptions } from '../shared'
7export class ImportsCommand extends AbstractCommand { 7export class ImportsCommand extends AbstractCommand {
8 8
9 importVideo (options: OverrideCommandOptions & { 9 importVideo (options: OverrideCommandOptions & {
10 attributes: VideoImportCreate & { torrentfile?: string } 10 attributes: (VideoImportCreate | { torrentfile?: string, previewfile?: string, thumbnailfile?: string })
11 }) { 11 }) {
12 const { attributes } = options 12 const { attributes } = options
13 const path = '/api/v1/videos/imports' 13 const path = '/api/v1/videos/imports'
14 14
15 let attaches: any = {} 15 let attaches: any = {}
16 if (attributes.torrentfile) attaches = { torrentfile: attributes.torrentfile } 16 if (attributes.torrentfile) attaches = { torrentfile: attributes.torrentfile }
17 if (attributes.thumbnailfile) attaches = { thumbnailfile: attributes.thumbnailfile }
18 if (attributes.previewfile) attaches = { previewfile: attributes.previewfile }
17 19
18 return unwrapBody<VideoImport>(this.postUploadRequest({ 20 return unwrapBody<VideoImport>(this.postUploadRequest({
19 ...options, 21 ...options,