mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 02:20:54 +08:00
improve peer count update
This commit is contained in:
@@ -758,11 +758,12 @@ class TrackerRepository extends BaseRepository
|
||||
*
|
||||
* @param Torrent $torrent
|
||||
* @param $queries
|
||||
* @param Peer $peer
|
||||
* @param bool $isPeerExists
|
||||
*/
|
||||
private function updateTorrent(Torrent $torrent, $queries, bool $isPeerExists)
|
||||
{
|
||||
if (!empty($queries['event'])) {
|
||||
if (!empty($queries['event']) || !$isPeerExists) {
|
||||
$torrent->seeders = Peer::query()
|
||||
->where('torrent', $torrent->id)
|
||||
->where('to_go', '=',0)
|
||||
|
||||
Reference in New Issue
Block a user