diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-08 20:34:01 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-08 20:34:01 +0100 |
commit | 9cc99d7b569765412c9898cfd5452dba5ee5e4b4 (patch) | |
tree | c604ecdd078e6f5bea4b08ed1274904b19aa3d4d | |
parent | 99b727ec9c34863d24e23faa6fe1e49d4b359f31 (diff) | |
download | PeerTube-9cc99d7b569765412c9898cfd5452dba5ee5e4b4.tar.gz PeerTube-9cc99d7b569765412c9898cfd5452dba5ee5e4b4.tar.zst PeerTube-9cc99d7b569765412c9898cfd5452dba5ee5e4b4.zip |
Fix update host script
-rwxr-xr-x | scripts/update-host.js | 4 | ||||
-rw-r--r-- | server/models/video.js | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/update-host.js b/scripts/update-host.js index 91051e68b..18e35386c 100755 --- a/scripts/update-host.js +++ b/scripts/update-host.js | |||
@@ -26,9 +26,9 @@ db.init(true, function () { | |||
26 | if (err) throw err | 26 | if (err) throw err |
27 | 27 | ||
28 | videos.forEach(function (video) { | 28 | videos.forEach(function (video) { |
29 | const torrentName = video._id + '.torrent' | 29 | const torrentName = video.id + '.torrent' |
30 | const torrentPath = constants.CONFIG.STORAGE.TORRENTS_DIR + torrentName | 30 | const torrentPath = constants.CONFIG.STORAGE.TORRENTS_DIR + torrentName |
31 | const filename = video._id + video.extname | 31 | const filename = video.id + video.extname |
32 | 32 | ||
33 | const parsed = parseTorrent(fs.readFileSync(torrentPath)) | 33 | const parsed = parseTorrent(fs.readFileSync(torrentPath)) |
34 | parsed.announce = [ constants.CONFIG.WEBSERVER.WS + '://' + constants.CONFIG.WEBSERVER.HOST + '/tracker/socket' ] | 34 | parsed.announce = [ constants.CONFIG.WEBSERVER.WS + '://' + constants.CONFIG.WEBSERVER.HOST + '/tracker/socket' ] |
diff --git a/server/models/video.js b/server/models/video.js index 742150d69..d0fd61eb4 100644 --- a/server/models/video.js +++ b/server/models/video.js | |||
@@ -414,7 +414,7 @@ function getDurationFromFile (videoPath, callback) { | |||
414 | } | 414 | } |
415 | 415 | ||
416 | function list (callback) { | 416 | function list (callback) { |
417 | return this.find().asCallback() | 417 | return this.findAll().asCallback(callback) |
418 | } | 418 | } |
419 | 419 | ||
420 | function listForApi (start, count, sort, callback) { | 420 | function listForApi (start, count, sort, callback) { |