]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/server/job.model.ts
Add server plugin filter hooks for import with torrent and url (#2621)
[github/Chocobozzz/PeerTube.git] / shared / models / server / job.model.ts
index 57d61c480321643698b9391ff8b02804781f7f8c..61010e5a8682e8762f57d63527f7dc9978817ad7 100644 (file)
@@ -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