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.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