Fix update host script

This commit is contained in:
Chocobozzz 2017-02-08 20:34:01 +01:00
parent 99b727ec9c
commit 9cc99d7b56
2 changed files with 3 additions and 3 deletions

View File

@ -26,9 +26,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' ]

View File

@ -414,7 +414,7 @@ function getDurationFromFile (videoPath, callback) {
}
function list (callback) {
return this.find().asCallback()
return this.findAll().asCallback(callback)
}
function listForApi (start, count, sort, callback) {