aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 459fcb31e..f32010014 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1569,21 +1569,25 @@ export class VideoModel extends Model<VideoModel> {
1569 removeThumbnail () { 1569 removeThumbnail () {
1570 const thumbnailPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, this.getThumbnailName()) 1570 const thumbnailPath = join(CONFIG.STORAGE.THUMBNAILS_DIR, this.getThumbnailName())
1571 return unlinkPromise(thumbnailPath) 1571 return unlinkPromise(thumbnailPath)
1572 .catch(err => logger.warn('Cannot delete thumbnail %s.', thumbnailPath, { err }))
1572 } 1573 }
1573 1574
1574 removePreview () { 1575 removePreview () {
1575 // Same name than video thumbnail 1576 const previewPath = join(CONFIG.STORAGE.PREVIEWS_DIR + this.getPreviewName())
1576 return unlinkPromise(CONFIG.STORAGE.PREVIEWS_DIR + this.getPreviewName()) 1577 return unlinkPromise(previewPath)
1578 .catch(err => logger.warn('Cannot delete preview %s.', previewPath, { err }))
1577 } 1579 }
1578 1580
1579 removeFile (videoFile: VideoFileModel) { 1581 removeFile (videoFile: VideoFileModel) {
1580 const filePath = join(CONFIG.STORAGE.VIDEOS_DIR, this.getVideoFilename(videoFile)) 1582 const filePath = join(CONFIG.STORAGE.VIDEOS_DIR, this.getVideoFilename(videoFile))
1581 return unlinkPromise(filePath) 1583 return unlinkPromise(filePath)
1584 .catch(err => logger.warn('Cannot delete file %s.', filePath, { err }))
1582 } 1585 }
1583 1586
1584 removeTorrent (videoFile: VideoFileModel) { 1587 removeTorrent (videoFile: VideoFileModel) {
1585 const torrentPath = join(CONFIG.STORAGE.TORRENTS_DIR, this.getTorrentFileName(videoFile)) 1588 const torrentPath = join(CONFIG.STORAGE.TORRENTS_DIR, this.getTorrentFileName(videoFile))
1586 return unlinkPromise(torrentPath) 1589 return unlinkPromise(torrentPath)
1590 .catch(err => logger.warn('Cannot delete torrent %s.', torrentPath, { err }))
1587 } 1591 }
1588 1592
1589 getActivityStreamDuration () { 1593 getActivityStreamDuration () {