aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-16 22:29:27 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-16 22:29:27 +0100
commitf0f5567b6918fc60c8cab15e13aec03a89a91dfb (patch)
tree99dfdb9fa8273c9cda1360fd3b6bfccc515bf8be /server/lib/videos.js
parent5101105ef91bfe478f97546b78b321882da2079c (diff)
downloadPeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.tar.gz
PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.tar.zst
PeerTube-f0f5567b6918fc60c8cab15e13aec03a89a91dfb.zip
Use const/let now we use node 4.2
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 }