fixed other torrents number wrong

This commit is contained in:
OldHawk
2017-04-27 18:38:34 +08:00
parent 712532131b
commit 59c91b7780

View File

@@ -493,6 +493,7 @@ exports.torrentByID = function (req, res, next, id) {
if (err) {
callback(err);
} else {
torrent._other_torrents.splice(0, torrent._other_torrents.length);
torrents.forEach(function (t) {
if (!t._id.equals(torrent._id)) {
torrent._other_torrents.push(t);