diff --git a/src/gui/properties/propertieswidget.ui b/src/gui/properties/propertieswidget.ui index e8df7415b..574d256f0 100644 --- a/src/gui/properties/propertieswidget.ui +++ b/src/gui/properties/propertieswidget.ui @@ -633,7 +633,7 @@ - + @@ -652,7 +652,7 @@ - + diff --git a/src/webui/api/serialize/serialize_torrent.cpp b/src/webui/api/serialize/serialize_torrent.cpp index 75f5d74e2..560c933f4 100644 --- a/src/webui/api/serialize/serialize_torrent.cpp +++ b/src/webui/api/serialize/serialize_torrent.cpp @@ -154,7 +154,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent) {KEY_TORRENT_RATIO, adjustRatio(torrent.realRatio())}, {KEY_TORRENT_RATIO_LIMIT, torrent.ratioLimit()}, {KEY_TORRENT_POPULARITY, torrent.popularity()}, - {KEY_TORRENT_IMPORTANCE, torrent.importance()}, + {KEY_TORRENT_IMPORTANCE, adjustRatio(torrent.importance())}, {KEY_TORRENT_SEEDING_TIME_LIMIT, torrent.seedingTimeLimit()}, {KEY_TORRENT_INACTIVE_SEEDING_TIME_LIMIT, torrent.inactiveSeedingTimeLimit()}, {KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, Utils::DateTime::toSecsSinceEpoch(torrent.lastSeenComplete())}, diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 6f24632b5..101e6e134 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -1449,7 +1449,7 @@ window.qBittorrent.DynamicTable ??= (() => { }; // importance - this.columns["importance".updateId] = function(td, row) { + this.columns["importance"].updateId = function(td, row) { const value = this.getRowValue(row); const importance = (value === -1) ? "∞" : window.qBittorrent.Misc.toFixedPointString(value, 2); td.textContent = importance; diff --git a/src/webui/www/private/scripts/prop-general.js b/src/webui/www/private/scripts/prop-general.js index 926b9900c..5bf45f8be 100644 --- a/src/webui/www/private/scripts/prop-general.js +++ b/src/webui/www/private/scripts/prop-general.js @@ -175,7 +175,7 @@ window.qBittorrent.PropGeneral ??= (() => { document.getElementById("popularity").textContent = data.popularity.toFixed(2); - document.getElementById("importance").textContent = data.importance.toFixed(2); + document.getElementById("importance").textContent = (data.importance === -1) ? "∞" : data.importance.toFixed(2); document.getElementById("reannounce").textContent = window.qBittorrent.Misc.friendlyDuration(data.reannounce); diff --git a/src/webui/www/private/views/properties.html b/src/webui/www/private/views/properties.html index 9af0d761f..e4b30f3a7 100644 --- a/src/webui/www/private/views/properties.html +++ b/src/webui/www/private/views/properties.html @@ -52,8 +52,7 @@ QBT_TR(Popularity:)QBT_TR[CONTEXT=PropertiesWidget] - - + QBT_TR(Importance:)QBT_TR[CONTEXT=PropertiesWidget]