aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-06-28 20:17:05 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-06-28 20:17:05 +0200
commit907e9510c28b4b2816cba0c070e3feaa16b10ac3 (patch)
tree88d1a1651d83548a1e10d43b3db86a6f03f884e2 /server/models
parent00057e85a703713a8f0d96e01c49978be0987eb2 (diff)
downloadPeerTube-907e9510c28b4b2816cba0c070e3feaa16b10ac3.tar.gz
PeerTube-907e9510c28b4b2816cba0c070e3feaa16b10ac3.tar.zst
PeerTube-907e9510c28b4b2816cba0c070e3feaa16b10ac3.zip
Re enable the "seed all videos" function
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video.js10
1 files changed, 8 insertions, 2 deletions
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) {
230 findWithCount.call(this, query, start, count, sort, callback) 230 findWithCount.call(this, query, start, count, sort, callback)
231} 231}
232 232
233// TODO 233function seedAllExisting (callback) {
234function seedAllExisting () { 234 listOwned.call(this, function (err, videos) {
235 if (err) return callback(err)
235 236
237 async.each(videos, function (video, callbackEach) {
238 const videoPath = pathUtils.join(uploadsDir, video.namePath)
239 seed(videoPath, callbackEach)
240 }, callback)
241 })
236} 242}
237 243
238// --------------------------------------------------------------------------- 244// ---------------------------------------------------------------------------