diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 20:07:54 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 20:07:54 +0200 |
commit | b0f9f39ed70299a208d1b388c72de8b7f3510cb7 (patch) | |
tree | 4b7d388125265533ac2f6d4bf457d018617e1db6 /server/models/video | |
parent | e7dbeae8d915cdf4470ceb51c2724b04148b30b5 (diff) | |
download | PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.gz PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.zst PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.zip |
Begin user quota
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video.ts | 7 |
1 files changed, 4 insertions, 3 deletions
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' | |||
9 | import * as Promise from 'bluebird' | 9 | import * as Promise from 'bluebird' |
10 | 10 | ||
11 | import { TagInstance } from './tag-interface' | 11 | import { TagInstance } from './tag-interface' |
12 | import { UserInstance } from '../user/user-interface' | ||
12 | import { | 13 | import { |
13 | logger, | 14 | logger, |
14 | isVideoNameValid, | 15 | isVideoNameValid, |
@@ -582,7 +583,7 @@ transcodeVideofile = function (this: VideoInstance, inputVideoFile: VideoFileIns | |||
582 | return res() | 583 | return res() |
583 | }) | 584 | }) |
584 | .catch(err => { | 585 | .catch(err => { |
585 | // Autodestruction... | 586 | // Auto destruction... |
586 | this.destroy().catch(err => logger.error('Cannot destruct video after transcoding failure.', err)) | 587 | this.destroy().catch(err => logger.error('Cannot destruct video after transcoding failure.', err)) |
587 | 588 | ||
588 | return rej(err) | 589 | return rej(err) |
@@ -608,8 +609,8 @@ removeFile = function (this: VideoInstance, videoFile: VideoFileInstance) { | |||
608 | } | 609 | } |
609 | 610 | ||
610 | removeTorrent = function (this: VideoInstance, videoFile: VideoFileInstance) { | 611 | removeTorrent = function (this: VideoInstance, videoFile: VideoFileInstance) { |
611 | const torrenPath = join(CONFIG.STORAGE.TORRENTS_DIR, this.getTorrentFileName(videoFile)) | 612 | const torrentPath = join(CONFIG.STORAGE.TORRENTS_DIR, this.getTorrentFileName(videoFile)) |
612 | return unlinkPromise(torrenPath) | 613 | return unlinkPromise(torrentPath) |
613 | } | 614 | } |
614 | 615 | ||
615 | // ------------------------------ STATICS ------------------------------ | 616 | // ------------------------------ STATICS ------------------------------ |