mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
* More exit tweaking to make shutdown faster
* Fixed active upload icon in Web UI * Fixed text alignment in Web UI preferences dialog * Fixes to ratio display in Web UI transfer list and properties panel * Edited Queued/Paused/Checking icons so that they are the same for complete/incomplete torrents (easier to understand) * Color torrents in UI transfer list as in qBittorrent < 2.0 (more easily understandable) * Progress and size are now updated when files are filtered in torrent properties
This commit is contained in:
parent
63be5ffc74
commit
4dc8959f67
20 changed files with 93 additions and 59 deletions
|
@ -161,19 +161,11 @@ QVariantMap EventManager::getPropGeneralInfo(QString hash) const {
|
|||
data["time_elapsed"] = elapsed_txt;
|
||||
data["nb_connections"] = QString::number(h.num_connections())+" ("+tr("%1 max", "e.g. 10 max").arg(QString::number(h.connections_limit()))+")";
|
||||
// Update ratio info
|
||||
float ratio;
|
||||
if(h.total_payload_download() == 0){
|
||||
if(h.total_payload_upload() == 0)
|
||||
ratio = 1.;
|
||||
double ratio = BTSession->getRealRatio(h.hash());
|
||||
if(ratio > 100.)
|
||||
data["share_ratio"] = QString::fromUtf8("∞");
|
||||
else
|
||||
ratio = 10.; // Max ratio
|
||||
}else{
|
||||
ratio = (double)h.total_payload_upload()/(double)h.total_payload_download();
|
||||
if(ratio > 10.){
|
||||
ratio = 10.;
|
||||
}
|
||||
}
|
||||
data["share_ratio"] = QString(QByteArray::number(ratio, 'f', 1));
|
||||
data["share_ratio"] = QString(QByteArray::number(ratio, 'f', 1));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -210,7 +202,7 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
|
|||
case torrent_status::finished:
|
||||
case torrent_status::seeding:
|
||||
if(h.upload_payload_rate() > 0) {
|
||||
event["state"] = QVariant("seeding");
|
||||
event["state"] = QVariant("uploading");
|
||||
} else {
|
||||
event["state"] = QVariant("stalledUP");
|
||||
}
|
||||
|
@ -263,7 +255,7 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
|
|||
event["seed"] = QVariant(h.is_seed());
|
||||
double ratio = BTSession->getRealRatio(hash);
|
||||
if(ratio > 100.)
|
||||
QString::fromUtf8("∞");
|
||||
event["ratio"] = QString::fromUtf8("∞");
|
||||
else
|
||||
event["ratio"] = QVariant(QString::number(ratio, 'f', 1));
|
||||
event["hash"] = QVariant(hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue