We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28eca60 commit a69ccb2Copy full SHA for a69ccb2
1 file changed
src/rpc/torrent.ts
@@ -86,7 +86,7 @@ function getTrackerStatus(torrent: TorrentBase): string {
86
function getTrackerDlCount(torrent: TorrentBase): number {
87
const trackers = torrent.trackerStats as TrackerStats[];
88
if (torrent.status === Status.stopped || trackers.length === 0) return -1;
89
- return trackers.map((t) => t.downloadCount as number).reduce((total, current) => total + current, 0) as number;
+ return trackers.map((t) => t.downloadCount as number).reduce((total, current) => total + Math.max(current, 0), 0);
90
}
91
92
const portRe = /:\d+$/;
0 commit comments