1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Improve image test comparison

This commit is contained in:
Chocobozzz 2023-02-24 14:48:15 +01:00
parent 09a7ce0c60
commit d41f4a6dc6
No known key found for this signature in database
GPG key ID: 583A612D890159BE
17 changed files with 66 additions and 18 deletions

View file

@ -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<VideoImport>(this.postUploadRequest({
...options,