]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/update-host.js
Fix prod clean script
[github/Chocobozzz/PeerTube.git] / scripts / update-host.js
index 91051e68b400d85e843bce8fe340a8ebb7da516e..8ae0f0d0e400e045f236ea6cb8d009913e5a16b1 100755 (executable)
@@ -2,8 +2,6 @@
 
 'use strict'
 
-// TODO: document this script
-
 const fs = require('fs')
 const parseTorrent = require('parse-torrent')
 
@@ -26,9 +24,9 @@ db.init(true, function () {
       if (err) throw err
 
       videos.forEach(function (video) {
-        const torrentName = video._id + '.torrent'
+        const torrentName = video.id + '.torrent'
         const torrentPath = constants.CONFIG.STORAGE.TORRENTS_DIR + torrentName
-        const filename = video._id + video.extname
+        const filename = video.id + video.extname
 
         const parsed = parseTorrent(fs.readFileSync(torrentPath))
         parsed.announce = [ constants.CONFIG.WEBSERVER.WS + '://' + constants.CONFIG.WEBSERVER.HOST + '/tracker/socket' ]