mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 10:08:31 -05:00
fix: only use active peers for stats and bon
This commit is contained in:
@@ -165,6 +165,7 @@ class StatsController extends Controller
|
||||
'seeders' => Peer::with('user')
|
||||
->select(DB::raw('user_id, count(distinct torrent_id) as value'))
|
||||
->where('seeder', '=', 1)
|
||||
->where('active', '=', 1)
|
||||
->groupBy('user_id')
|
||||
->orderByDesc('value')
|
||||
->take(100)
|
||||
@@ -181,6 +182,7 @@ class StatsController extends Controller
|
||||
'leechers' => Peer::with('user')
|
||||
->select(DB::raw('user_id, count(*) as value'))
|
||||
->where('seeder', '=', 0)
|
||||
->where('active', '=', 1)
|
||||
->groupBy('user_id')
|
||||
->orderByDesc('value')
|
||||
->take(100)
|
||||
|
||||
Reference in New Issue
Block a user