mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-12 15:57:57 +00:00
WebAPI: Use specific number to represent non-existing values
Closes #15545.
This commit is contained in:
parent
e96f2d7be0
commit
5c9655abc3
@ -176,7 +176,7 @@ namespace
|
|||||||
const QJsonObject dht
|
const QJsonObject dht
|
||||||
{
|
{
|
||||||
{KEY_TRACKER_URL, "** [DHT] **"},
|
{KEY_TRACKER_URL, "** [DHT] **"},
|
||||||
{KEY_TRACKER_TIER, ""},
|
{KEY_TRACKER_TIER, -1},
|
||||||
{KEY_TRACKER_MSG, (isTorrentPrivate ? privateMsg : "")},
|
{KEY_TRACKER_MSG, (isTorrentPrivate ? privateMsg : "")},
|
||||||
{KEY_TRACKER_STATUS, ((BitTorrent::Session::instance()->isDHTEnabled() && !isTorrentPrivate) ? working : disabled)},
|
{KEY_TRACKER_STATUS, ((BitTorrent::Session::instance()->isDHTEnabled() && !isTorrentPrivate) ? working : disabled)},
|
||||||
{KEY_TRACKER_PEERS_COUNT, 0},
|
{KEY_TRACKER_PEERS_COUNT, 0},
|
||||||
@ -188,7 +188,7 @@ namespace
|
|||||||
const QJsonObject pex
|
const QJsonObject pex
|
||||||
{
|
{
|
||||||
{KEY_TRACKER_URL, "** [PeX] **"},
|
{KEY_TRACKER_URL, "** [PeX] **"},
|
||||||
{KEY_TRACKER_TIER, ""},
|
{KEY_TRACKER_TIER, -1},
|
||||||
{KEY_TRACKER_MSG, (isTorrentPrivate ? privateMsg : "")},
|
{KEY_TRACKER_MSG, (isTorrentPrivate ? privateMsg : "")},
|
||||||
{KEY_TRACKER_STATUS, ((BitTorrent::Session::instance()->isPeXEnabled() && !isTorrentPrivate) ? working : disabled)},
|
{KEY_TRACKER_STATUS, ((BitTorrent::Session::instance()->isPeXEnabled() && !isTorrentPrivate) ? working : disabled)},
|
||||||
{KEY_TRACKER_PEERS_COUNT, 0},
|
{KEY_TRACKER_PEERS_COUNT, 0},
|
||||||
@ -200,7 +200,7 @@ namespace
|
|||||||
const QJsonObject lsd
|
const QJsonObject lsd
|
||||||
{
|
{
|
||||||
{KEY_TRACKER_URL, "** [LSD] **"},
|
{KEY_TRACKER_URL, "** [LSD] **"},
|
||||||
{KEY_TRACKER_TIER, ""},
|
{KEY_TRACKER_TIER, -1},
|
||||||
{KEY_TRACKER_MSG, (isTorrentPrivate ? privateMsg : "")},
|
{KEY_TRACKER_MSG, (isTorrentPrivate ? privateMsg : "")},
|
||||||
{KEY_TRACKER_STATUS, ((BitTorrent::Session::instance()->isLSDEnabled() && !isTorrentPrivate) ? working : disabled)},
|
{KEY_TRACKER_STATUS, ((BitTorrent::Session::instance()->isLSDEnabled() && !isTorrentPrivate) ? working : disabled)},
|
||||||
{KEY_TRACKER_PEERS_COUNT, 0},
|
{KEY_TRACKER_PEERS_COUNT, 0},
|
||||||
|
@ -97,7 +97,7 @@ window.qBittorrent.PropTrackers = (function() {
|
|||||||
|
|
||||||
const row = {
|
const row = {
|
||||||
rowId: tracker.url,
|
rowId: tracker.url,
|
||||||
tier: tracker.tier,
|
tier: (tracker.tier >= 0) ? tracker.tier : "",
|
||||||
url: tracker.url,
|
url: tracker.url,
|
||||||
status: status,
|
status: status,
|
||||||
peers: tracker.num_peers,
|
peers: tracker.num_peers,
|
||||||
|
Loading…
Reference in New Issue
Block a user