mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Video lib/model/reqvalidator refractoring
This commit is contained in:
parent
86e054b20f
commit
5101105ef9
3 changed files with 23 additions and 41 deletions
|
@ -12,10 +12,21 @@ var Videos = require('../models/videos')
|
|||
var uploadDir = path.join(__dirname, '..', '..', config.get('storage.uploads'))
|
||||
|
||||
var videos = {
|
||||
getVideoState: getVideoState,
|
||||
seed: seed,
|
||||
seedAllExisting: seedAllExisting
|
||||
}
|
||||
|
||||
function getVideoState (video, callback) {
|
||||
var exist = (video !== null)
|
||||
var owned = false
|
||||
if (exist === true) {
|
||||
owned = (video.namePath !== null)
|
||||
}
|
||||
|
||||
return callback({ exist: exist, owned: owned })
|
||||
}
|
||||
|
||||
function seed (path, callback) {
|
||||
logger.info('Seeding %s...', path)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue