aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/redundancy/video-redundancy.ts2
-rw-r--r--server/models/video/video.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index 529977924..e8d79a3ab 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -160,7 +160,7 @@ export class VideoRedundancyModel extends Model<Partial<AttributesOnly<VideoRedu
160 const logIdentifier = `${videoFile.Video.uuid}-${videoFile.resolution}` 160 const logIdentifier = `${videoFile.Video.uuid}-${videoFile.resolution}`
161 logger.info('Removing duplicated video file %s.', logIdentifier) 161 logger.info('Removing duplicated video file %s.', logIdentifier)
162 162
163 videoFile.Video.removeFileAndTorrent(videoFile, true) 163 videoFile.Video.removeWebTorrentFileAndTorrent(videoFile, true)
164 .catch(err => logger.error('Cannot delete %s files.', logIdentifier, { err })) 164 .catch(err => logger.error('Cannot delete %s files.', logIdentifier, { err }))
165 } 165 }
166 166
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 69d009e04..6eeb6b312 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -746,7 +746,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
746 746
747 // Remove physical files and torrents 747 // Remove physical files and torrents
748 instance.VideoFiles.forEach(file => { 748 instance.VideoFiles.forEach(file => {
749 tasks.push(instance.removeFileAndTorrent(file)) 749 tasks.push(instance.removeWebTorrentFileAndTorrent(file))
750 }) 750 })
751 751
752 // Remove playlists file 752 // Remove playlists file
@@ -1706,7 +1706,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1706 .concat(toAdd) 1706 .concat(toAdd)
1707 } 1707 }
1708 1708
1709 removeFileAndTorrent (videoFile: MVideoFile, isRedundancy = false) { 1709 removeWebTorrentFileAndTorrent (videoFile: MVideoFile, isRedundancy = false) {
1710 const filePath = isRedundancy 1710 const filePath = isRedundancy
1711 ? VideoPathManager.Instance.getFSRedundancyVideoFilePath(this, videoFile) 1711 ? VideoPathManager.Instance.getFSRedundancyVideoFilePath(this, videoFile)
1712 : VideoPathManager.Instance.getFSVideoFileOutputPath(this, videoFile) 1712 : VideoPathManager.Instance.getFSVideoFileOutputPath(this, videoFile)