return 'https://download.cpy.re/peertube/bad_video.mp4'
}
-function importVideo (url: string, token: string, attributes: VideoImportCreate) {
+function getGoodVideoUrl () {
+ return 'https://download.cpy.re/peertube/good_video.mp4'
+}
+
+function importVideo (url: string, token: string, attributes: VideoImportCreate & { torrentfile?: string }, statusCodeExpected = 200) {
const path = '/api/v1/videos/imports'
let attaches: any = {}
token,
attaches,
fields: attributes,
- statusCodeExpected: 200
+ statusCodeExpected
})
}
getYoutubeVideoUrl,
importVideo,
getMagnetURI,
- getMyVideoImports
+ getMyVideoImports,
+ getGoodVideoUrl
}