mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 09:43:07 -07:00
- some more Web Ui fixes
This commit is contained in:
parent
d219e7afeb
commit
a65cd5c39c
2 changed files with 27 additions and 7 deletions
|
@ -73,6 +73,12 @@ void EventManager::addedTorrent(QTorrentHandle& h)
|
|||
event["hash"] = QVariant(hash);
|
||||
event["name"] = QVariant(h.name());
|
||||
event["seed"] = QVariant(h.is_seed());
|
||||
event["size"] = QVariant((qlonglong)h.actual_size());
|
||||
if(!h.is_seed()) {
|
||||
event["progress"] = QVariant(h.progress());
|
||||
event["dlspeed"] = QVariant(h.download_payload_rate());
|
||||
}
|
||||
event["upspeed"] = QVariant(h.upload_payload_rate());
|
||||
if(h.is_paused()) {
|
||||
if(BTSession->isQueueingEnabled() && (BTSession->isDownloadQueued(hash) || BTSession->isUploadQueued(hash)))
|
||||
event["state"] = QVariant("queued");
|
||||
|
@ -267,6 +273,9 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
|
|||
if(modify(hash, "state", v))
|
||||
event["state"] = v;
|
||||
|
||||
v = QVariant(h.name());
|
||||
if(modify(hash, "name", v))
|
||||
event["name"] = v;
|
||||
v = QVariant((qlonglong)h.actual_size());
|
||||
if(modify(hash, "size", v))
|
||||
event["size"] = v;
|
||||
|
@ -280,14 +289,8 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
|
|||
event["dlspeed"] = v;
|
||||
}
|
||||
v = QVariant(h.upload_payload_rate());
|
||||
if(modify(hash, "upspeed", v)) {
|
||||
if(modify(hash, "upspeed", v))
|
||||
event["upspeed"] = v;
|
||||
if(h.is_seed())
|
||||
qDebug("upspeed changed for seed");
|
||||
} else {
|
||||
if(h.is_seed())
|
||||
qDebug("upspeed did not change for seed");
|
||||
}
|
||||
v = QVariant(h.is_seed());
|
||||
event["seed"] = v;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue