diff options
Diffstat (limited to 'server/lib/videos.js')
-rw-r--r-- | server/lib/videos.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/server/lib/videos.js b/server/lib/videos.js index a5fe7b0c4..eb3a0125a 100644 --- a/server/lib/videos.js +++ b/server/lib/videos.js | |||
@@ -1,25 +1,24 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | var async = require('async') | 3 | const async = require('async') |
4 | var config = require('config') | 4 | const config = require('config') |
5 | // TODO | 5 | const pathUtils = require('path') |
6 | var path = require('path') | 6 | const webtorrent = require('../lib/webtorrent') |
7 | var webtorrent = require('../lib/webtorrent') | ||
8 | 7 | ||
9 | var logger = require('../helpers/logger') | 8 | const logger = require('../helpers/logger') |
10 | var Videos = require('../models/videos') | 9 | const Videos = require('../models/videos') |
11 | 10 | ||
12 | var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads')) | 11 | const uploadDir = pathUtils.join(__dirname, '..', '..', config.get('storage.uploads')) |
13 | 12 | ||
14 | var videos = { | 13 | const videos = { |
15 | getVideoState: getVideoState, | 14 | getVideoState: getVideoState, |
16 | seed: seed, | 15 | seed: seed, |
17 | seedAllExisting: seedAllExisting | 16 | seedAllExisting: seedAllExisting |
18 | } | 17 | } |
19 | 18 | ||
20 | function getVideoState (video, callback) { | 19 | function getVideoState (video, callback) { |
21 | var exist = (video !== null) | 20 | const exist = (video !== null) |
22 | var owned = false | 21 | let owned = false |
23 | if (exist === true) { | 22 | if (exist === true) { |
24 | owned = (video.namePath !== null) | 23 | owned = (video.namePath !== null) |
25 | } | 24 | } |