Add availability column

Closes #1632.
This commit is contained in:
Chocobo1
2019-07-21 15:20:54 +08:00
parent cfedbf8e6b
commit 60faba60ea
6 changed files with 28 additions and 3 deletions

View File

@@ -125,6 +125,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
ret[KEY_TORRENT_LAST_SEEN_COMPLETE_TIME] = torrent.lastSeenComplete().toTime_t();
ret[KEY_TORRENT_AUTO_TORRENT_MANAGEMENT] = torrent.isAutoTMMEnabled();
ret[KEY_TORRENT_TIME_ACTIVE] = torrent.activeTime();
ret[KEY_TORRENT_AVAILABILITY] = torrent.distributedCopies();
if (torrent.isPaused() || torrent.isChecking()) {
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = 0;

View File

@@ -78,5 +78,6 @@ const char KEY_TORRENT_LAST_ACTIVITY_TIME[] = "last_activity";
const char KEY_TORRENT_TOTAL_SIZE[] = "total_size";
const char KEY_TORRENT_AUTO_TORRENT_MANAGEMENT[] = "auto_tmm";
const char KEY_TORRENT_TIME_ACTIVE[] = "time_active";
const char KEY_TORRENT_AVAILABILITY[] = "availability";
QVariantMap serialize(const BitTorrent::TorrentHandle &torrent);