diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-17 16:04:53 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 09:04:30 +0100 |
commit | b46cf4b920984492df598c1b61179acfc7f6f22e (patch) | |
tree | 21fda049c85be48ab3d37b537aafa98e94649ad7 /server/lib/job-queue/handlers | |
parent | 3cfa817672657df18260ece5b354efa0f3b6e317 (diff) | |
download | PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.gz PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.tar.zst PeerTube-b46cf4b920984492df598c1b61179acfc7f6f22e.zip |
Add ability to remove hls/webtorrent files
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/video-file-import.ts | 2 | ||||
-rw-r--r-- | server/lib/job-queue/handlers/video-transcoding.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/video-file-import.ts b/server/lib/job-queue/handlers/video-file-import.ts index 47ae10a66..a91c2ef80 100644 --- a/server/lib/job-queue/handlers/video-file-import.ts +++ b/server/lib/job-queue/handlers/video-file-import.ts | |||
@@ -55,7 +55,7 @@ async function updateVideoFile (video: MVideoFullLight, inputFilePath: string) { | |||
55 | 55 | ||
56 | if (currentVideoFile) { | 56 | if (currentVideoFile) { |
57 | // Remove old file and old torrent | 57 | // Remove old file and old torrent |
58 | await video.removeFileAndTorrent(currentVideoFile) | 58 | await video.removeWebTorrentFileAndTorrent(currentVideoFile) |
59 | // Remove the old video file from the array | 59 | // Remove the old video file from the array |
60 | video.VideoFiles = video.VideoFiles.filter(f => f !== currentVideoFile) | 60 | video.VideoFiles = video.VideoFiles.filter(f => f !== currentVideoFile) |
61 | 61 | ||
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts index 0143cd02a..904ef2e3c 100644 --- a/server/lib/job-queue/handlers/video-transcoding.ts +++ b/server/lib/job-queue/handlers/video-transcoding.ts | |||
@@ -138,7 +138,7 @@ async function onHlsPlaylistGeneration (video: MVideoFullLight, user: MUser, pay | |||
138 | if (payload.isMaxQuality && CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { | 138 | if (payload.isMaxQuality && CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false) { |
139 | // Remove webtorrent files if not enabled | 139 | // Remove webtorrent files if not enabled |
140 | for (const file of video.VideoFiles) { | 140 | for (const file of video.VideoFiles) { |
141 | await video.removeFileAndTorrent(file) | 141 | await video.removeWebTorrentFileAndTorrent(file) |
142 | await file.destroy() | 142 | await file.destroy() |
143 | } | 143 | } |
144 | 144 | ||