aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-24 14:48:15 +0100
committerChocobozzz <me@florianbigard.com>2023-02-24 15:10:13 +0100
commitd41f4a6dc69d098e9dc9173b7e1a586695ef7b97 (patch)
tree828ec8e08a1f326369e3720c310e2b059be9ead5 /shared/server-commands/videos
parent09a7ce0c60d3e98eedf58f245bf2aaba9837785b (diff)
downloadPeerTube-d41f4a6dc69d098e9dc9173b7e1a586695ef7b97.tar.gz
PeerTube-d41f4a6dc69d098e9dc9173b7e1a586695ef7b97.tar.zst
PeerTube-d41f4a6dc69d098e9dc9173b7e1a586695ef7b97.zip
Improve image test comparison
Diffstat (limited to 'shared/server-commands/videos')
-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,