From 907e9510c28b4b2816cba0c070e3feaa16b10ac3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jun 2016 20:17:05 +0200 Subject: Re enable the "seed all videos" function --- server/models/video.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'server/models') diff --git a/server/models/video.js b/server/models/video.js index 8b14e9b35..b111e29aa 100644 --- a/server/models/video.js +++ b/server/models/video.js @@ -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) + }) } // --------------------------------------------------------------------------- -- cgit v1.2.3