mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06:00
Add "Last Activity" column to transfer list
This column shows the time elapsed since the related torrent has received or sent a chunk. Closes #517.
This commit is contained in:
@@ -292,6 +292,13 @@ QVariant TorrentModelItem::data(int column, int role) const
|
||||
}
|
||||
case TR_SEEN_COMPLETE_DATE:
|
||||
return m_lastStatus.last_seen_complete ? QDateTime::fromTime_t(m_lastStatus.last_seen_complete) : QDateTime();
|
||||
case TR_LAST_ACTIVITY:
|
||||
if (m_torrent.is_paused(m_lastStatus) || m_torrent.is_checking(m_lastStatus))
|
||||
return -1;
|
||||
if (m_lastStatus.time_since_upload < m_lastStatus.time_since_download)
|
||||
return m_lastStatus.time_since_upload;
|
||||
else
|
||||
return m_lastStatus.time_since_download;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@@ -369,6 +376,7 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
||||
case TorrentModelItem::TR_COMPLETED: return tr("Completed", "Amount of data completed (e.g. in MB)");
|
||||
case TorrentModelItem::TR_RATIO_LIMIT: return tr("Ratio Limit", "Upload share ratio limit");
|
||||
case TorrentModelItem::TR_SEEN_COMPLETE_DATE: return tr("Last Seen Complete", "Torrent was seen complete on 01/01/2010 08:00");
|
||||
case TorrentModelItem::TR_LAST_ACTIVITY: return tr("Last Activity", "Time passed since a chunk was downloaded/uploaded");
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user