diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-transcoding.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-transcoding.ts | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts index f5ba6f435..2abb351ce 100644 --- a/server/lib/job-queue/handlers/video-transcoding.ts +++ b/server/lib/job-queue/handlers/video-transcoding.ts | |||
@@ -28,21 +28,10 @@ import { JobQueue } from '../job-queue' | |||
28 | 28 | ||
29 | type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<any> | 29 | type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<any> |
30 | 30 | ||
31 | const handlers: { [ id: string ]: HandlerFunction } = { | 31 | const handlers: { [ id in VideoTranscodingPayload['type'] ]: HandlerFunction } = { |
32 | // Deprecated, introduced in 3.1 | ||
33 | 'hls': handleHLSJob, | ||
34 | 'new-resolution-to-hls': handleHLSJob, | 32 | 'new-resolution-to-hls': handleHLSJob, |
35 | |||
36 | // Deprecated, introduced in 3.1 | ||
37 | 'new-resolution': handleNewWebTorrentResolutionJob, | ||
38 | 'new-resolution-to-webtorrent': handleNewWebTorrentResolutionJob, | 33 | 'new-resolution-to-webtorrent': handleNewWebTorrentResolutionJob, |
39 | |||
40 | // Deprecated, introduced in 3.1 | ||
41 | 'merge-audio': handleWebTorrentMergeAudioJob, | ||
42 | 'merge-audio-to-webtorrent': handleWebTorrentMergeAudioJob, | 34 | 'merge-audio-to-webtorrent': handleWebTorrentMergeAudioJob, |
43 | |||
44 | // Deprecated, introduced in 3.1 | ||
45 | 'optimize': handleWebTorrentOptimizeJob, | ||
46 | 'optimize-to-webtorrent': handleWebTorrentOptimizeJob | 35 | 'optimize-to-webtorrent': handleWebTorrentOptimizeJob |
47 | } | 36 | } |
48 | 37 | ||
@@ -125,8 +114,7 @@ async function onHlsPlaylistGeneration (video: MVideoFullLight, user: MUser, pay | |||
125 | if (payload.isMaxQuality && CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { | 114 | if (payload.isMaxQuality && CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { |
126 | // Remove webtorrent files if not enabled | 115 | // Remove webtorrent files if not enabled |
127 | for (const file of video.VideoFiles) { | 116 | for (const file of video.VideoFiles) { |
128 | await video.removeFile(file) | 117 | await video.removeFileAndTorrent(file) |
129 | await file.removeTorrent() | ||
130 | await file.destroy() | 118 | await file.destroy() |
131 | } | 119 | } |
132 | 120 | ||