From f241183fb1888b4a04339fcb48e402a246491f35 Mon Sep 17 00:00:00 2001 From: wipedlifepotato <60944239+wipedlifepotato@users.noreply.github.com> Date: Fri, 21 Aug 2026 16:39:35 +0300 Subject: [PATCH] add_jsonrpc2_torrent_get --- libi2pd_client/TorrentsRPC.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libi2pd_client/TorrentsRPC.cpp b/libi2pd_client/TorrentsRPC.cpp index 5180faa3..b4d822a7 100644 --- a/libi2pd_client/TorrentsRPC.cpp +++ b/libi2pd_client/TorrentsRPC.cpp @@ -208,6 +208,7 @@ namespace torrents std::string JSONRPCHandler::HandleTorrentGet (boost::json::object&& jsonRequest) { + auto arguments = jsonRequest.at ("arguments").as_object (); std::vector torrentIds; bool torrentsRequested = arguments.contains ("ids"); @@ -225,6 +226,7 @@ namespace torrents auto fields = arguments.at ("fields").as_array (); boost::json::object response; + response["jsonrpc"] = "2.0"; boost::json::array torrents; for (auto id: torrentIds) {