mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Still remodeling the UI
- Improved Web UI performance by make more work on server side (C++) and less work on client side (Javascript)
This commit is contained in:
parent
13e22aef51
commit
e187426dd5
5 changed files with 61 additions and 57 deletions
|
@ -283,6 +283,20 @@ int TransferListWidget::updateTorrent(int row) {
|
|||
return s;
|
||||
}
|
||||
}
|
||||
// Connected_seeds*100000+total_seeds*10 (if total_seeds is available)
|
||||
// Connected_seeds*100000+1 (if total_seeds is unavailable)
|
||||
qulonglong seeds = h.num_seeds()*1000000;
|
||||
if(h.num_complete() >= h.num_seeds())
|
||||
seeds += h.num_complete()*10;
|
||||
else
|
||||
seeds += 1;
|
||||
listModel->setData(listModel->index(row, TR_SEEDS), QVariant(seeds));
|
||||
qulonglong peers = (h.num_peers()-h.num_seeds())*1000000;
|
||||
if(h.num_incomplete() >= (h.num_peers()-h.num_seeds()))
|
||||
peers += h.num_incomplete()*10;
|
||||
else
|
||||
peers += 1;
|
||||
listModel->setData(listModel->index(row, TR_PEERS), QVariant(peers));
|
||||
if(h.is_paused()) {
|
||||
if(h.is_seed())
|
||||
return STATE_PAUSED_UP;
|
||||
|
@ -331,20 +345,6 @@ int TransferListWidget::updateTorrent(int row) {
|
|||
// Common to both downloads and uploads
|
||||
listModel->setData(listModel->index(row, TR_STATUS), s);
|
||||
listModel->setData(listModel->index(row, TR_UPSPEED), QVariant((double)h.upload_payload_rate()));
|
||||
// Connected_seeds*100000+total_seeds*10 (if total_seeds is available)
|
||||
// Connected_seeds*100000+1 (if total_seeds is unavailable)
|
||||
qulonglong seeds = h.num_seeds()*1000000;
|
||||
if(h.num_complete() >= h.num_seeds())
|
||||
seeds += h.num_complete()*10;
|
||||
else
|
||||
seeds += 1;
|
||||
listModel->setData(listModel->index(row, TR_SEEDS), QVariant(seeds));
|
||||
qulonglong peers = (h.num_peers()-h.num_seeds())*1000000;
|
||||
if(h.num_incomplete() >= (h.num_peers()-h.num_seeds()))
|
||||
peers += h.num_incomplete()*10;
|
||||
else
|
||||
peers += 1;
|
||||
listModel->setData(listModel->index(row, TR_PEERS), QVariant(peers));
|
||||
// Share ratio
|
||||
listModel->setData(listModel->index(row, TR_RATIO), QVariant(BTSession->getRealRatio(hash)));
|
||||
}catch(invalid_handle e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue