mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Improve loading of magnet metadata in the background.
Conflicts: src/qtlibtorrent/qbtsession.cpp
This commit is contained in:
@@ -151,9 +151,14 @@ QVariant TorrentModelItem::data(int column, int role) const
|
||||
if (role != Qt::DisplayRole && role != Qt::UserRole) return QVariant();
|
||||
switch(column) {
|
||||
case TR_NAME:
|
||||
return m_name.isEmpty()? m_torrent.name() : m_name;
|
||||
case TR_PRIORITY:
|
||||
return m_torrent.queue_position();
|
||||
return m_name.isEmpty() ? m_torrent.name() : m_name;
|
||||
case TR_PRIORITY: {
|
||||
int pos = m_torrent.queue_position();
|
||||
if (pos > -1)
|
||||
return pos - HiddenData::getSize();
|
||||
else
|
||||
return pos;
|
||||
}
|
||||
case TR_SIZE:
|
||||
return m_torrent.has_metadata() ? static_cast<qlonglong>(m_torrent.actual_size()) : -1;
|
||||
case TR_PROGRESS:
|
||||
|
||||
Reference in New Issue
Block a user