mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
parent
d7bacdcbff
commit
560ecbc6c3
@ -147,6 +147,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
|
|||||||
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, torrent.lastSeenComplete().toSecsSinceEpoch()},
|
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, torrent.lastSeenComplete().toSecsSinceEpoch()},
|
||||||
{KEY_TORRENT_AUTO_TORRENT_MANAGEMENT, torrent.isAutoTMMEnabled()},
|
{KEY_TORRENT_AUTO_TORRENT_MANAGEMENT, torrent.isAutoTMMEnabled()},
|
||||||
{KEY_TORRENT_TIME_ACTIVE, torrent.activeTime()},
|
{KEY_TORRENT_TIME_ACTIVE, torrent.activeTime()},
|
||||||
|
{KEY_TORRENT_SEEDING_TIME, torrent.seedingTime()},
|
||||||
{KEY_TORRENT_LAST_ACTIVITY_TIME, adjustLastActivity(torrent.timeSinceActivity())},
|
{KEY_TORRENT_LAST_ACTIVITY_TIME, adjustLastActivity(torrent.timeSinceActivity())},
|
||||||
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ const char KEY_TORRENT_LAST_ACTIVITY_TIME[] = "last_activity";
|
|||||||
const char KEY_TORRENT_TOTAL_SIZE[] = "total_size";
|
const char KEY_TORRENT_TOTAL_SIZE[] = "total_size";
|
||||||
const char KEY_TORRENT_AUTO_TORRENT_MANAGEMENT[] = "auto_tmm";
|
const char KEY_TORRENT_AUTO_TORRENT_MANAGEMENT[] = "auto_tmm";
|
||||||
const char KEY_TORRENT_TIME_ACTIVE[] = "time_active";
|
const char KEY_TORRENT_TIME_ACTIVE[] = "time_active";
|
||||||
|
const char KEY_TORRENT_SEEDING_TIME[] = "seeding_time";
|
||||||
const char KEY_TORRENT_AVAILABILITY[] = "availability";
|
const char KEY_TORRENT_AVAILABILITY[] = "availability";
|
||||||
|
|
||||||
QVariantMap serialize(const BitTorrent::Torrent &torrent);
|
QVariantMap serialize(const BitTorrent::Torrent &torrent);
|
||||||
|
@ -856,6 +856,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|||||||
|
|
||||||
this.columns['num_seeds'].dataProperties.push('num_complete');
|
this.columns['num_seeds'].dataProperties.push('num_complete');
|
||||||
this.columns['num_leechs'].dataProperties.push('num_incomplete');
|
this.columns['num_leechs'].dataProperties.push('num_incomplete');
|
||||||
|
this.columns['time_active'].dataProperties.push('seeding_time');
|
||||||
|
|
||||||
this.initColumnsFunctions();
|
this.initColumnsFunctions();
|
||||||
},
|
},
|
||||||
@ -1161,7 +1162,13 @@ window.qBittorrent.DynamicTable = (function() {
|
|||||||
|
|
||||||
// time active
|
// time active
|
||||||
this.columns['time_active'].updateTd = function(td, row) {
|
this.columns['time_active'].updateTd = function(td, row) {
|
||||||
const time = window.qBittorrent.Misc.friendlyDuration(this.getRowValue(row));
|
const activeTime = this.getRowValue(row, 0);
|
||||||
|
const seedingTime = this.getRowValue(row, 1);
|
||||||
|
const time = (seedingTime > 0)
|
||||||
|
? ('QBT_TR(%1 (seeded for %2))QBT_TR[CONTEXT=TransferListDelegate]'
|
||||||
|
.replace('%1', window.qBittorrent.Misc.friendlyDuration(activeTime))
|
||||||
|
.replace('%2', window.qBittorrent.Misc.friendlyDuration(seedingTime)))
|
||||||
|
: window.qBittorrent.Misc.friendlyDuration(activeTime);
|
||||||
td.set('text', time);
|
td.set('text', time);
|
||||||
td.set('title', time);
|
td.set('title', time);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user