1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02: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:
Rigel Kent 2020-05-14 11:10:26 +02:00 committed by GitHub
parent 7405b6ba89
commit 2158ac9034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 261 additions and 43 deletions

View file

@ -9,9 +9,13 @@ export const serverFilterHookObject = {
// Used to get detailed video information (video watch page for example)
'filter:api.video.get.result': true,
// Filter the result of the accept upload function
// Filter the result of the accept upload, import via torrent or url functions
// If this function returns false then the upload is aborted with an error
'filter:api.video.upload.accept.result': true,
'filter:api.video.pre-import-url.accept.result': true,
'filter:api.video.pre-import-torrent.accept.result': true,
'filter:api.video.post-import-url.accept.result': true,
'filter:api.video.post-import-torrent.accept.result': true,
// Filter the result of the accept comment (thread or reply) functions
// If the functions return false then the user cannot post its comment
'filter:api.video-thread.create.accept.result': true,