From b0f9f39ed70299a208d1b388c72de8b7f3510cb7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Sep 2017 20:07:54 +0200 Subject: Begin user quota --- server/models/video/video.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 7dfea8ac9..4fb4485d8 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -9,6 +9,7 @@ import * as Sequelize from 'sequelize' import * as Promise from 'bluebird' import { TagInstance } from './tag-interface' +import { UserInstance } from '../user/user-interface' import { logger, isVideoNameValid, @@ -582,7 +583,7 @@ transcodeVideofile = function (this: VideoInstance, inputVideoFile: VideoFileIns return res() }) .catch(err => { - // Autodestruction... + // Auto destruction... this.destroy().catch(err => logger.error('Cannot destruct video after transcoding failure.', err)) return rej(err) @@ -608,8 +609,8 @@ removeFile = function (this: VideoInstance, videoFile: VideoFileInstance) { } removeTorrent = function (this: VideoInstance, videoFile: VideoFileInstance) { - const torrenPath = join(CONFIG.STORAGE.TORRENTS_DIR, this.getTorrentFileName(videoFile)) - return unlinkPromise(torrenPath) + const torrentPath = join(CONFIG.STORAGE.TORRENTS_DIR, this.getTorrentFileName(videoFile)) + return unlinkPromise(torrentPath) } // ------------------------------ STATICS ------------------------------ -- cgit v1.2.3