mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Add auto torrent management to webui context menu (addresses #6815)
This commit is contained in:
committed by
sledgehammer999
parent
dfded7bc9d
commit
1002b28c95
@@ -110,6 +110,7 @@ static const char KEY_TORRENT_RATIO_LIMIT[] = "ratio_limit";
|
||||
static const char KEY_TORRENT_LAST_SEEN_COMPLETE_TIME[] = "seen_complete";
|
||||
static const char KEY_TORRENT_LAST_ACTIVITY_TIME[] = "last_activity";
|
||||
static const char KEY_TORRENT_TOTAL_SIZE[] = "total_size";
|
||||
static const char KEY_TORRENT_AUTO_TORRENT_MANAGEMENT[] = "auto_tmm";
|
||||
|
||||
// Peer keys
|
||||
static const char KEY_PEER_IP[] = "ip";
|
||||
@@ -824,6 +825,7 @@ QVariantMap toMap(BitTorrent::TorrentHandle *const torrent)
|
||||
ret[KEY_TORRENT_AMOUNT_COMPLETED] = torrent->completedSize();
|
||||
ret[KEY_TORRENT_RATIO_LIMIT] = torrent->maxRatio();
|
||||
ret[KEY_TORRENT_LAST_SEEN_COMPLETE_TIME] = torrent->lastSeenComplete().toTime_t();
|
||||
ret[KEY_TORRENT_AUTO_TORRENT_MANAGEMENT] = torrent->isAutoTMMEnabled();
|
||||
|
||||
if (torrent->isPaused() || torrent->isChecking())
|
||||
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = 0;
|
||||
|
||||
Reference in New Issue
Block a user