Browse Source

Fix size display for torrents without metadata

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
2de4c50d4f
  1. 2
      src/qtlibtorrent/torrentmodel.cpp

2
src/qtlibtorrent/torrentmodel.cpp

@ -116,7 +116,7 @@ QVariant TorrentModelItem::data(int column, int role) const
case TR_PRIORITY: case TR_PRIORITY:
return m_torrent.queue_position(); return m_torrent.queue_position();
case TR_SIZE: case TR_SIZE:
return static_cast<qlonglong>(m_torrent.actual_size()); return m_torrent.has_metadata() ? static_cast<qlonglong>(m_torrent.actual_size()) : -1;
case TR_PROGRESS: case TR_PROGRESS:
return m_torrent.progress(); return m_torrent.progress();
case TR_STATUS: case TR_STATUS:

Loading…
Cancel
Save