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:
parent
09a7ce0c60
commit
d41f4a6dc6
17 changed files with 66 additions and 18 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue