From 9d6d3a30eb5a3cd6c95b671af8973c10a4145a21 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 12 Nov 2023 17:12:02 +0800 Subject: [PATCH] Improve performance of getting torrent numbers via WebAPI PR #19919. --- src/webui/api/torrentscontroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 0fe0a5466..6a3b73876 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -236,7 +236,7 @@ namespace void TorrentsController::countAction() { - setResult(QString::number(BitTorrent::Session::instance()->torrents().count())); + setResult(QString::number(BitTorrent::Session::instance()->torrentsCount())); } // Returns all the torrents in JSON format.