aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-04 20:07:54 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-04 20:07:54 +0200
commitb0f9f39ed70299a208d1b388c72de8b7f3510cb7 (patch)
tree4b7d388125265533ac2f6d4bf457d018617e1db6 /server/models/video/video.ts
parente7dbeae8d915cdf4470ceb51c2724b04148b30b5 (diff)
downloadPeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.gz
PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.tar.zst
PeerTube-b0f9f39ed70299a208d1b388c72de8b7f3510cb7.zip
Begin user quota
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts7
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'
9import * as Promise from 'bluebird' 9import * as Promise from 'bluebird'
10 10
11import { TagInstance } from './tag-interface' 11import { TagInstance } from './tag-interface'
12import { UserInstance } from '../user/user-interface'
12import { 13import {
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
610removeTorrent = function (this: VideoInstance, videoFile: VideoFileInstance) { 611removeTorrent = 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 ------------------------------