From 59d968e116bbaa60212efeeafad56cc21e338b80 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 dfb6a378e..4d20e2727 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -234,7 +234,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.