mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add server plugin filter hooks for import with torrent and url (#2621)
* Add server plugin filter hooks for import with torrent and url * WIP: pre and post-import filter hooks * Rebased * Cleanup filters to accept imports Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
@@ -15,7 +15,7 @@ function getBadVideoUrl () {
|
||||
return 'https://download.cpy.re/peertube/bad_video.mp4'
|
||||
}
|
||||
|
||||
function importVideo (url: string, token: string, attributes: VideoImportCreate) {
|
||||
function importVideo (url: string, token: string, attributes: VideoImportCreate & { torrentfile?: string }, statusCodeExpected = 200) {
|
||||
const path = '/api/v1/videos/imports'
|
||||
|
||||
let attaches: any = {}
|
||||
@@ -27,7 +27,7 @@ function importVideo (url: string, token: string, attributes: VideoImportCreate)
|
||||
token,
|
||||
attaches,
|
||||
fields: attributes,
|
||||
statusCodeExpected: 200
|
||||
statusCodeExpected
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user