diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-05-14 11:10:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 11:10:26 +0200 |
commit | 2158ac90341dc3fcae958540de65032da25c8d6e (patch) | |
tree | a780923d701f3daa130996768e38c1e1b6a0646c /shared/models/server | |
parent | 7405b6ba897dbce1b4fd50c92174f1df5ac15adc (diff) | |
download | PeerTube-2158ac90341dc3fcae958540de65032da25c8d6e.tar.gz PeerTube-2158ac90341dc3fcae958540de65032da25c8d6e.tar.zst PeerTube-2158ac90341dc3fcae958540de65032da25c8d6e.zip |
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>
Diffstat (limited to 'shared/models/server')
-rw-r--r-- | shared/models/server/job.model.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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 = { | |||
70 | filePath: string | 70 | filePath: string |
71 | } | 71 | } |
72 | 72 | ||
73 | export type VideoImportTorrentPayloadType = 'magnet-uri' | 'torrent-file' | ||
74 | export type VideoImportYoutubeDLPayloadType = 'youtube-dl' | ||
75 | |||
73 | export type VideoImportYoutubeDLPayload = { | 76 | export type VideoImportYoutubeDLPayload = { |
74 | type: 'youtube-dl' | 77 | type: VideoImportYoutubeDLPayloadType |
75 | videoImportId: number | 78 | videoImportId: number |
76 | 79 | ||
77 | generateThumbnail: boolean | 80 | generateThumbnail: boolean |
@@ -80,7 +83,7 @@ export type VideoImportYoutubeDLPayload = { | |||
80 | fileExt?: string | 83 | fileExt?: string |
81 | } | 84 | } |
82 | export type VideoImportTorrentPayload = { | 85 | export type VideoImportTorrentPayload = { |
83 | type: 'magnet-uri' | 'torrent-file' | 86 | type: VideoImportTorrentPayloadType |
84 | videoImportId: number | 87 | videoImportId: number |
85 | } | 88 | } |
86 | export type VideoImportPayload = VideoImportYoutubeDLPayload | VideoImportTorrentPayload | 89 | export type VideoImportPayload = VideoImportYoutubeDLPayload | VideoImportTorrentPayload |