aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-16 21:37:17 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-16 21:37:17 +0100
commit5101105ef91bfe478f97546b78b321882da2079c (patch)
treea3deec88917fecb8f4299c710bab9ba7679b4803 /server/lib/videos.js
parent86e054b20fabb5934e09d0bcb096840dd28d69fd (diff)
downloadPeerTube-5101105ef91bfe478f97546b78b321882da2079c.tar.gz
PeerTube-5101105ef91bfe478f97546b78b321882da2079c.tar.zst
PeerTube-5101105ef91bfe478f97546b78b321882da2079c.zip
Video lib/model/reqvalidator refractoring
Diffstat (limited to 'server/lib/videos.js')
-rw-r--r--server/lib/videos.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/lib/videos.js b/server/lib/videos.js
index 3c6ee4a65..a5fe7b0c4 100644
--- a/server/lib/videos.js
+++ b/server/lib/videos.js
@@ -12,10 +12,21 @@ var Videos = require('../models/videos')
12var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads')) 12var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads'))
13 13
14var videos = { 14var videos = {
15 getVideoState: getVideoState,
15 seed: seed, 16 seed: seed,
16 seedAllExisting: seedAllExisting 17 seedAllExisting: seedAllExisting
17} 18}
18 19
20function getVideoState (video, callback) {
21 var exist = (video !== null)
22 var owned = false
23 if (exist === true) {
24 owned = (video.namePath !== null)
25 }
26
27 return callback({ exist: exist, owned: owned })
28}
29
19function seed (path, callback) { 30function seed (path, callback) {
20 logger.info('Seeding %s...', path) 31 logger.info('Seeding %s...', path)
21 32