aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index fb18a485a..4bd8eb98f 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -334,12 +334,15 @@ function afterDestroy (video: VideoInstance, options: { transaction: Sequelize.T
334 334
335 // Remove physical files and torrents 335 // Remove physical files and torrents
336 video.VideoFiles.forEach(file => { 336 video.VideoFiles.forEach(file => {
337 video.removeFile(file), 337 tasks.push(video.removeFile(file))
338 video.removeTorrent(file) 338 tasks.push(video.removeTorrent(file))
339 }) 339 })
340 } 340 }
341 341
342 return Promise.all(tasks) 342 return Promise.all(tasks)
343 .catch(err => {
344 logger.error('Some errors when removing files of video %d in after destroy hook.', video.uuid, err)
345 })
343} 346}
344 347
345getOriginalFile = function (this: VideoInstance) { 348getOriginalFile = function (this: VideoInstance) {