mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 21:51:25 -07:00
WebUI: Change torrent model
Improvements: - added functions, which may be used to reorder and hiding columns in torrents table - new columns can be easily added to torrents table
This commit is contained in:
parent
91ec84b317
commit
04f1c0c238
6 changed files with 593 additions and 341 deletions
|
@ -218,12 +218,9 @@ static QVariantMap toMap(const QTorrentHandle& h)
|
|||
ret[KEY_TORRENT_RATIO] = (ratio > QBtSession::MAX_RATIO) ? -1 : ratio;
|
||||
ret[KEY_TORRENT_STATE] = h.torrentState().toString();
|
||||
ret[KEY_TORRENT_ETA] = h.eta();
|
||||
if (h.has_metadata()) {
|
||||
if (status.sequential_download)
|
||||
ret[KEY_TORRENT_SEQUENTIAL_DOWNLOAD] = true;
|
||||
if (h.first_last_piece_first())
|
||||
ret[KEY_TORRENT_FIRST_LAST_PIECE_PRIO] = true;
|
||||
}
|
||||
ret[KEY_TORRENT_SEQUENTIAL_DOWNLOAD] = status.sequential_download;
|
||||
if (h.has_metadata())
|
||||
ret[KEY_TORRENT_FIRST_LAST_PIECE_PRIO] = h.first_last_piece_first();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue