mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-30 12:18:05 -06:00
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -828,12 +828,12 @@ const TorrentsTable = new Class({
|
||||
this.newColumn('max_ratio', '', 'QBT_TR(Ratio Limit)QBT_TR[CONTEXT=TransferListModel]', 100, false);
|
||||
this.newColumn('seen_complete', '', 'QBT_TR(Last Seen Complete)QBT_TR[CONTEXT=TransferListModel]', 100, false);
|
||||
this.newColumn('last_activity', '', 'QBT_TR(Last Activity)QBT_TR[CONTEXT=TransferListModel]', 100, false);
|
||||
this.newColumn('availability', '', 'QBT_TR(Availability)QBT_TR[CONTEXT=TransferListModel]', 100, false);
|
||||
|
||||
this.columns['state_icon'].onclick = '';
|
||||
this.columns['state_icon'].dataProperties[0] = 'state';
|
||||
|
||||
this.columns['num_seeds'].dataProperties.push('num_complete');
|
||||
|
||||
this.columns['num_leechs'].dataProperties.push('num_incomplete');
|
||||
|
||||
this.initColumnsFunctions();
|
||||
@@ -1181,6 +1181,13 @@ const TorrentsTable = new Class({
|
||||
td.set('html', time);
|
||||
td.set('title', time);
|
||||
};
|
||||
|
||||
// availability
|
||||
this.columns['availability'].updateTd = function(td, row) {
|
||||
const value = (Math.floor(1000 * this.getRowValue(row)) / 1000).toFixed(3); // Don't round up
|
||||
td.set('html', value);
|
||||
td.set('title', value);
|
||||
};
|
||||
},
|
||||
|
||||
applyFilter: function(row, filterName, categoryHash, tagHash, filterTerms) {
|
||||
|
||||
Reference in New Issue
Block a user