]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.js
Re enable the "seed all videos" function
[github/Chocobozzz/PeerTube.git] / server.js
index 33e34019d96333f80f9b57fa60db0d9947f099b8..9322bca19e500038fced0335f8a644a09c786248 100644 (file)
--- a/server.js
+++ b/server.js
@@ -37,6 +37,7 @@ const routes = require('./server/controllers')
 const utils = require('./server/helpers/utils')
 const webtorrent = require('./server/lib/webtorrent')
 const Request = mongoose.model('Request')
+const Video = mongoose.model('Video')
 
 // Get configurations
 const port = config.get('listen.port')
@@ -139,11 +140,13 @@ installer.installApplication(function (err) {
       // Activate the pool requests
       Request.activate()
 
-      // videos.seedAllExisting(function () {
+      Video.seedAllExisting(function (err) {
+        if (err) throw err
+
         logger.info('Seeded all the videos')
         logger.info('Server listening on port %d', port)
         app.emit('ready')
-      // })
+      })
     })
   })
 })