summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web
diff options
context:
space:
mode:
authorDjLegolas <djlegolas@protonmail.com>2022-01-22 00:33:28 +0200
committerCalum Lind <calumlind+deluge@gmail.com>2022-02-13 11:36:04 +0000
commit2bd095e5bfc49cbe178fc0ba9df38b88afc238aa (patch)
tree87bdfac362f8915f53e12818b5f7a289f5837367 /deluge/ui/web
parent513d5f06e5545ad6f5b77a304395190bf55464b6 (diff)
downloaddeluge-2bd095e5bfc49cbe178fc0ba9df38b88afc238aa.tar.gz
deluge-2bd095e5bfc49cbe178fc0ba9df38b88afc238aa.tar.bz2
deluge-2bd095e5bfc49cbe178fc0ba9df38b88afc238aa.zip
[Core] Stopped using libtorrent deprecated functions
As part of the process of adding support to LT 2.0, we should stop using all deprecated function, as some (if not all) were removed. For this process, we should use the LT 1.2 upgrade (guide)[1]. The change includes: * stop using file entries directly * start using the torrent handle's set/unset flags * stop using url key in add_torrent_params (for magnet) * stop accessing resume_data from save_resume_data_alert * stop using deprecated session status keys in UI [1] https://libtorrent.org/upgrade_to_1.2-ref.html Closes: https://dev.deluge-torrent.org/ticket/3499 Closes: https://github.com/deluge-torrent/deluge/pull/342
Diffstat (limited to 'deluge/ui/web')
-rw-r--r--deluge/ui/web/json_api.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py
index aa15d5ac6..e16c440ed 100644
--- a/deluge/ui/web/json_api.py
+++ b/deluge/ui/web/json_api.py
@@ -515,7 +515,7 @@ class WebApi(JSONComponent):
return d
def got_stats(stats):
- ui_info['stats']['num_connections'] = stats['num_peers']
+ ui_info['stats']['num_connections'] = stats['peer.num_peers_connected']
ui_info['stats']['upload_rate'] = stats['payload_upload_rate']
ui_info['stats']['download_rate'] = stats['payload_download_rate']
ui_info['stats']['download_protocol_rate'] = (
@@ -524,9 +524,9 @@ class WebApi(JSONComponent):
ui_info['stats']['upload_protocol_rate'] = (
stats['upload_rate'] - stats['payload_upload_rate']
)
- ui_info['stats']['dht_nodes'] = stats['dht_nodes']
+ ui_info['stats']['dht_nodes'] = stats['dht.dht_nodes']
ui_info['stats']['has_incoming_connections'] = stats[
- 'has_incoming_connections'
+ 'net.has_incoming_connections'
]
def got_filters(filters):
@@ -552,13 +552,13 @@ class WebApi(JSONComponent):
d3 = client.core.get_session_status(
[
- 'num_peers',
+ 'peer.num_peers_connected',
'payload_download_rate',
'payload_upload_rate',
'download_rate',
'upload_rate',
- 'dht_nodes',
- 'has_incoming_connections',
+ 'dht.dht_nodes',
+ 'net.has_incoming_connections',
]
)
d3.addCallback(got_stats)