mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fixed share ratio display in properties widget and in Web UI
This commit is contained in:
parent
9ada7c809b
commit
4908458729
3 changed files with 18 additions and 16 deletions
|
@ -258,7 +258,11 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
|
|||
leechs += " ("+QString::number(h.num_incomplete())+")";
|
||||
event["num_leechs"] = QVariant(leechs);
|
||||
event["seed"] = QVariant(h.is_seed());
|
||||
event["ratio"] = QVariant(QString::number(BTSession->getRealRatio(hash), 'f', 1));
|
||||
double ratio = BTSession->getRealRatio(hash);
|
||||
if(ratio > 100.)
|
||||
QString::fromUtf8("∞");
|
||||
else
|
||||
event["ratio"] = QVariant(QString::number(ratio, 'f', 1));
|
||||
event["hash"] = QVariant(hash);
|
||||
event_list[hash] = event;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue