mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-29 19:18:42 -07:00
Merge pull request #1685 from sorokin/fix-exception-in-prop-widget
Don't show availability bar for magnet links
This commit is contained in:
commit
81fa246687
1 changed files with 2 additions and 2 deletions
|
@ -337,7 +337,7 @@ void PropertiesWidget::loadDynamicData() {
|
||||||
// Update ratio info
|
// Update ratio info
|
||||||
const qreal ratio = QBtSession::instance()->getRealRatio(h.hash());
|
const qreal ratio = QBtSession::instance()->getRealRatio(h.hash());
|
||||||
shareRatio->setText(ratio > QBtSession::MAX_RATIO ? QString::fromUtf8("∞") : misc::accurateDoubleToString(ratio, 2));
|
shareRatio->setText(ratio > QBtSession::MAX_RATIO ? QString::fromUtf8("∞") : misc::accurateDoubleToString(ratio, 2));
|
||||||
if (!h.is_seed()) {
|
if (!h.is_seed() && h.has_metadata()) {
|
||||||
showPiecesDownloaded(true);
|
showPiecesDownloaded(true);
|
||||||
// Downloaded pieces
|
// Downloaded pieces
|
||||||
#if LIBTORRENT_VERSION_NUM < 10000
|
#if LIBTORRENT_VERSION_NUM < 10000
|
||||||
|
@ -348,7 +348,7 @@ void PropertiesWidget::loadDynamicData() {
|
||||||
h.downloading_pieces(bf);
|
h.downloading_pieces(bf);
|
||||||
downloaded_pieces->setProgress(h.pieces(), bf);
|
downloaded_pieces->setProgress(h.pieces(), bf);
|
||||||
// Pieces availability
|
// Pieces availability
|
||||||
if (h.has_metadata() && !h.is_paused() && !h.is_queued() && !h.is_checking()) {
|
if (!h.is_paused() && !h.is_queued() && !h.is_checking()) {
|
||||||
showPiecesAvailability(true);
|
showPiecesAvailability(true);
|
||||||
std::vector<int> avail;
|
std::vector<int> avail;
|
||||||
h.piece_availability(avail);
|
h.piece_availability(avail);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue