mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Fix torrent transfer stats
This commit is contained in:
parent
fda1797149
commit
00f40e6771
@ -284,13 +284,13 @@ QString btjson::getPropertiesForTorrent(const QString& hash)
|
|||||||
data.add(KEY_PROP_UPLOADED, QString(misc::friendlyUnit(h.all_time_upload()) + " (" + misc::friendlyUnit(h.total_payload_upload()) + " " + tr("this session") + ")"));
|
data.add(KEY_PROP_UPLOADED, QString(misc::friendlyUnit(h.all_time_upload()) + " (" + misc::friendlyUnit(h.total_payload_upload()) + " " + tr("this session") + ")"));
|
||||||
data.add(KEY_PROP_DOWNLOADED, QString(misc::friendlyUnit(h.all_time_download()) + " (" + misc::friendlyUnit(h.total_payload_download()) + " " + tr("this session") + ")"));
|
data.add(KEY_PROP_DOWNLOADED, QString(misc::friendlyUnit(h.all_time_download()) + " (" + misc::friendlyUnit(h.total_payload_download()) + " " + tr("this session") + ")"));
|
||||||
if (h.upload_limit() <= 0)
|
if (h.upload_limit() <= 0)
|
||||||
data.add(KEY_PROP_UPLOADED, QString::fromUtf8("∞"));
|
data.add(KEY_PROP_UP_LIMIT, QString::fromUtf8("∞"));
|
||||||
else
|
else
|
||||||
data.add(KEY_PROP_UPLOADED, misc::friendlyUnit(h.upload_limit(), true));
|
data.add(KEY_PROP_UP_LIMIT, misc::friendlyUnit(h.upload_limit(), true));
|
||||||
if (h.download_limit() <= 0)
|
if (h.download_limit() <= 0)
|
||||||
data.add(KEY_PROP_DOWNLOADED, QString::fromUtf8("∞"));
|
data.add(KEY_PROP_DL_LIMIT, QString::fromUtf8("∞"));
|
||||||
else
|
else
|
||||||
data.add(KEY_PROP_DOWNLOADED, misc::friendlyUnit(h.download_limit(), true));
|
data.add(KEY_PROP_DL_LIMIT, misc::friendlyUnit(h.download_limit(), true));
|
||||||
QString elapsed_txt = misc::userFriendlyDuration(h.active_time());
|
QString elapsed_txt = misc::userFriendlyDuration(h.active_time());
|
||||||
if (h.is_seed())
|
if (h.is_seed())
|
||||||
elapsed_txt += " ("+tr("Seeded for %1", "e.g. Seeded for 3m10s").arg(misc::userFriendlyDuration(h.seeding_time()))+")";
|
elapsed_txt += " ("+tr("Seeded for %1", "e.g. Seeded for 3m10s").arg(misc::userFriendlyDuration(h.seeding_time()))+")";
|
||||||
|
Loading…
Reference in New Issue
Block a user