diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/videos.js | 11 |
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') | |||
12 | var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads')) | 12 | var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads')) |
13 | 13 | ||
14 | var videos = { | 14 | var videos = { |
15 | getVideoState: getVideoState, | ||
15 | seed: seed, | 16 | seed: seed, |
16 | seedAllExisting: seedAllExisting | 17 | seedAllExisting: seedAllExisting |
17 | } | 18 | } |
18 | 19 | ||
20 | function 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 | |||
19 | function seed (path, callback) { | 30 | function seed (path, callback) { |
20 | logger.info('Seeding %s...', path) | 31 | logger.info('Seeding %s...', path) |
21 | 32 | ||