Re enable the "seed all videos" function

This commit is contained in:
Chocobozzz
2016-06-28 20:17:05 +02:00
parent 00057e85a7
commit 907e9510c2
2 changed files with 13 additions and 4 deletions

View File

@@ -230,9 +230,15 @@ function search (value, field, start, count, sort, callback) {
findWithCount.call(this, query, start, count, sort, callback)
}
// TODO
function seedAllExisting () {
function seedAllExisting (callback) {
listOwned.call(this, function (err, videos) {
if (err) return callback(err)
async.each(videos, function (video, callbackEach) {
const videoPath = pathUtils.join(uploadsDir, video.namePath)
seed(videoPath, callbackEach)
}, callback)
})
}
// ---------------------------------------------------------------------------