update: working optimized announce

This commit is contained in:
HDVinnie
2023-01-17 22:01:28 -05:00
parent bf9b72c47c
commit b044cbc92c
9 changed files with 71 additions and 98 deletions
+1 -1
View File
@@ -80,6 +80,7 @@ class UserActive extends Component
->join('torrents', 'peers.torrent_id', '=', 'torrents.id')
->select(
'peers.id',
'peers.ip',
'peers.port',
'peers.agent',
'peers.uploaded',
@@ -96,7 +97,6 @@ class UserActive extends Component
'torrents.leechers',
'torrents.times_completed',
)
->selectRaw('INET6_NTOA(ip) as ip')
->selectRaw('(1 - (peers.left / NULLIF(torrents.size, 0))) AS progress')
->where('peers.user_id', '=', $this->user->id)
->when(