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/server/job.model.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'shared/models/server/job.model.ts') diff --git a/shared/models/server/job.model.ts b/shared/models/server/job.model.ts index 57d61c480..61010e5a8 100644 --- a/shared/models/server/job.model.ts +++ b/shared/models/server/job.model.ts @@ -70,8 +70,11 @@ export type VideoFileImportPayload = { filePath: string } +export type VideoImportTorrentPayloadType = 'magnet-uri' | 'torrent-file' +export type VideoImportYoutubeDLPayloadType = 'youtube-dl' + export type VideoImportYoutubeDLPayload = { - type: 'youtube-dl' + type: VideoImportYoutubeDLPayloadType videoImportId: number generateThumbnail: boolean @@ -80,7 +83,7 @@ export type VideoImportYoutubeDLPayload = { fileExt?: string } export type VideoImportTorrentPayload = { - type: 'magnet-uri' | 'torrent-file' + type: VideoImportTorrentPayloadType videoImportId: number } export type VideoImportPayload = VideoImportYoutubeDLPayload | VideoImportTorrentPayload -- cgit v1.2.3