aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/videos.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/videos.js')
-rw-r--r--server/lib/videos.js21
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
3var async = require('async') 3const async = require('async')
4var config = require('config') 4const config = require('config')
5// TODO 5const pathUtils = require('path')
6var path = require('path') 6const webtorrent = require('../lib/webtorrent')
7var webtorrent = require('../lib/webtorrent')
8 7
9var logger = require('../helpers/logger') 8const logger = require('../helpers/logger')
10var Videos = require('../models/videos') 9const Videos = require('../models/videos')
11 10
12var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads')) 11const uploadDir = pathUtils.join(__dirname, '..', '..', config.get('storage.uploads'))
13 12
14var videos = { 13const videos = {
15 getVideoState: getVideoState, 14 getVideoState: getVideoState,
16 seed: seed, 15 seed: seed,
17 seedAllExisting: seedAllExisting 16 seedAllExisting: seedAllExisting
18} 17}
19 18
20function getVideoState (video, callback) { 19function 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 }