]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/server/job.model.ts
Don't use @shared in models
[github/Chocobozzz/PeerTube.git] / shared / models / server / job.model.ts
index 694361276c23c8bc051dfe9ad2046c4219b26226..c643e60179832ebd2bd7c8755b9b36cdd0883fa2 100644 (file)
@@ -1,6 +1,6 @@
-import { ContextType } from '@server/helpers/activitypub'
+import { ContextType } from '../activitypub/context'
+import { VideoResolution } from '../videos/video-resolution.enum'
 import { SendEmailOptions } from './emailer.model'
-import { VideoResolution } from '@shared/models'
 
 export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed'
 
@@ -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