WebUI: Display torrent progress percentage in General tab

This PR adds torrent progress percentage next to pieces bar in General tab, as in the GUI.

PR #21756.
This commit is contained in:
skomerko
2024-11-09 09:03:20 +01:00
committed by GitHub
parent 06fe3e5fb0
commit 71f83cf9ba
4 changed files with 27 additions and 9 deletions

View File

@@ -116,6 +116,7 @@ const QString KEY_PROP_SSL_CERTIFICATE = u"ssl_certificate"_s;
const QString KEY_PROP_SSL_PRIVATEKEY = u"ssl_private_key"_s;
const QString KEY_PROP_SSL_DHPARAMS = u"ssl_dh_params"_s;
const QString KEY_PROP_HAS_METADATA = u"has_metadata"_s;
const QString KEY_PROP_PROGRESS = u"progress"_s;
// File keys
@@ -503,7 +504,8 @@ void TorrentsController::propertiesAction()
{KEY_PROP_SAVE_PATH, torrent->savePath().toString()},
{KEY_PROP_DOWNLOAD_PATH, torrent->downloadPath().toString()},
{KEY_PROP_COMMENT, torrent->comment()},
{KEY_PROP_HAS_METADATA, torrent->hasMetadata()}
{KEY_PROP_HAS_METADATA, torrent->hasMetadata()},
{KEY_PROP_PROGRESS, torrent->progress()}
};
setResult(ret);