Fix update host script
This commit is contained in:
parent
99b727ec9c
commit
9cc99d7b56
2 changed files with 3 additions and 3 deletions
|
@ -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' ]
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue