mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-24 01:08:06 -06:00
Added 'Ratio Limit' column. Closes #936.
This commit is contained in:
@@ -260,6 +260,10 @@ QVariant TorrentModelItem::data(int column, int role) const
|
||||
return fsutils::toNativePath(m_torrent.save_path_parsed());
|
||||
case TR_COMPLETED:
|
||||
return static_cast<qlonglong>(m_lastStatus.total_wanted_done);
|
||||
case TR_RATIO_LIMIT: {
|
||||
QString hash = misc::toQString(m_lastStatus.info_hash);
|
||||
return QBtSession::instance()->getMaxRatioPerTorrent(hash, NULL);
|
||||
}
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@@ -335,6 +339,7 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
||||
case TorrentModelItem::TR_TIME_ELAPSED: return tr("Time Active", "Time (duration) the torrent is active (not paused)");
|
||||
case TorrentModelItem::TR_SAVE_PATH: return tr("Save path", "Torrent save path");
|
||||
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");
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user