This commit is contained in:
xiaomlove
2021-06-08 10:42:39 +08:00
parent 557c9d3b30
commit 6361f96d62
15 changed files with 109 additions and 39 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
namespace Nexus\Torrent;
use Nexus\Database\DB;
use Nexus\Database\NexusDB;
class Torrent
{
@@ -19,7 +19,7 @@ class Torrent
$torrentIdStr = implode(',', $torrentIdArr);
//seeding or leeching, from peers
$whereStr = sprintf("userid = %s and torrent in (%s)", sqlesc($uid), $torrentIdStr);
$peerList = DB::getAll('peers', $whereStr, 'torrent, to_go');
$peerList = NexusDB::getAll('peers', $whereStr, 'torrent, to_go');
$peerList = array_column($peerList,'to_go', 'torrent');
//download progress, from snatched
$sql = sprintf(
@@ -64,4 +64,4 @@ class Torrent
);
return $result;
}
}
}