From 2158ac90341dc3fcae958540de65032da25c8d6e Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 14 May 2020 11:10:26 +0200 Subject: 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 --- shared/models/plugins/server-hook.model.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'shared/models/plugins/server-hook.model.ts') diff --git a/shared/models/plugins/server-hook.model.ts b/shared/models/plugins/server-hook.model.ts index 20f89b86d..5f812904f 100644 --- a/shared/models/plugins/server-hook.model.ts +++ b/shared/models/plugins/server-hook.model.ts @@ -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, -- cgit v1.2.3