diff --git a/libi2pd_client/TorrentsRPC.cpp b/libi2pd_client/TorrentsRPC.cpp index 7dfe7fb7..950ff1b1 100644 --- a/libi2pd_client/TorrentsRPC.cpp +++ b/libi2pd_client/TorrentsRPC.cpp @@ -319,7 +319,7 @@ namespace torrents { "totalSize", [](std::shared_ptr torrent) { return boost::json::value(torrent->GetLength ()); } }, { "percentDone", [](std::shared_ptr torrent) { - if (!torrent->GetLength ()) return boost::json::value (1.0); + if (!torrent->GetLength ()) return boost::json::value (0.0); return boost::json::value ((float)(torrent->GetLength () - torrent->GetLeft ())/(float)torrent->GetLength ()); } },