From d29a3abd74f6eff28a8f8a7483ecbad5ed19ed17 Mon Sep 17 00:00:00 2001 From: Ghost_chu Date: Sun, 7 Apr 2024 21:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DWebAPI=E7=9A=84=E5=AF=B9?= =?UTF-8?q?=E7=AD=89=E4=BD=93=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ghostchu/peerbanhelper/web/api/PBHClientStatus.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ghostchu/peerbanhelper/web/api/PBHClientStatus.java b/src/main/java/com/ghostchu/peerbanhelper/web/api/PBHClientStatus.java index 259ca3a997..e5ce6c4003 100644 --- a/src/main/java/com/ghostchu/peerbanhelper/web/api/PBHClientStatus.java +++ b/src/main/java/com/ghostchu/peerbanhelper/web/api/PBHClientStatus.java @@ -35,7 +35,7 @@ public NanoHTTPD.Response handle(NanoHTTPD.IHTTPSession session) { try { map.put("status", downloader.getLastStatus().name()); List torrents = downloader.getTorrents(); - long peers = torrents.stream().mapToLong(t -> downloader.getPeers(t).size()).count(); + long peers = torrents.stream().mapToLong(t -> downloader.getPeers(t).size()).sum(); map.put("torrents", torrents.size()); map.put("peers", peers); } catch (Throwable th) {