From d41f4a6dc69d098e9dc9173b7e1a586695ef7b97 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 24 Feb 2023 14:48:15 +0100 Subject: Improve image test comparison --- shared/server-commands/videos/imports-command.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'shared/server-commands') 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' export class ImportsCommand extends AbstractCommand { importVideo (options: OverrideCommandOptions & { - attributes: VideoImportCreate & { torrentfile?: string } + attributes: (VideoImportCreate | { torrentfile?: string, previewfile?: string, thumbnailfile?: string }) }) { const { attributes } = options const path = '/api/v1/videos/imports' let attaches: any = {} if (attributes.torrentfile) attaches = { torrentfile: attributes.torrentfile } + if (attributes.thumbnailfile) attaches = { thumbnailfile: attributes.thumbnailfile } + if (attributes.previewfile) attaches = { previewfile: attributes.previewfile } return unwrapBody(this.postUploadRequest({ ...options, -- cgit v1.2.3