mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
fix config template
This commit is contained in:
parent
d1b8075fe6
commit
79b9eda351
2 changed files with 3 additions and 10 deletions
|
@ -14,7 +14,7 @@ $for group in groups:
|
||||||
$else:
|
$else:
|
||||||
<li><a href="/config/$page">$pages[page].title</a></li>
|
<li><a href="/config/$page">$pages[page].title</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
<!--form block-->
|
<!--form block-->
|
||||||
<div class="panel" id="config_panel">
|
<div class="panel" id="config_panel">
|
||||||
<h2>$form.group / $form.title</h2>
|
<h2>$form.group / $form.title</h2>
|
||||||
|
|
|
@ -124,7 +124,6 @@ def get_stats():
|
||||||
,"max_connections_global")
|
,"max_connections_global")
|
||||||
async_proxy.get_dht_nodes(dict_cb('dht_nodes',stats))
|
async_proxy.get_dht_nodes(dict_cb('dht_nodes',stats))
|
||||||
|
|
||||||
|
|
||||||
async_proxy.force_call(block=True)
|
async_proxy.force_call(block=True)
|
||||||
|
|
||||||
#log.debug(str(stats))
|
#log.debug(str(stats))
|
||||||
|
@ -162,7 +161,6 @@ def enhance_torrent_status(torrent_id,status):
|
||||||
status[key] = 0
|
status[key] = 0
|
||||||
#log.warning('torrent_status:None key in status:%s' % key)
|
#log.warning('torrent_status:None key in status:%s' % key)
|
||||||
|
|
||||||
|
|
||||||
if status.tracker == 0:
|
if status.tracker == 0:
|
||||||
#0.6 does not raise a decent error on non-existing torrent.
|
#0.6 does not raise a decent error on non-existing torrent.
|
||||||
raise UnknownTorrentError(torrent_id)
|
raise UnknownTorrentError(torrent_id)
|
||||||
|
@ -225,19 +223,14 @@ def get_torrent_status(torrent_id):
|
||||||
enhance proxy.get_torrent_status with some extra data
|
enhance proxy.get_torrent_status with some extra data
|
||||||
"""
|
"""
|
||||||
status = proxy.get_torrent_status(torrent_id,TORRENT_KEYS)
|
status = proxy.get_torrent_status(torrent_id,TORRENT_KEYS)
|
||||||
|
|
||||||
return enhance_torrent_status(torrent_id, status)
|
return enhance_torrent_status(torrent_id, status)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_torrent_list():
|
def get_torrent_list():
|
||||||
"""
|
"""
|
||||||
returns a list of storified-torrent-dicts.
|
returns a list of storified-torrent-dicts.
|
||||||
"""
|
"""
|
||||||
torrent_ids = proxy.get_session_state()
|
torrent_dict = proxy.get_torrents_status(
|
||||||
|
proxy.get_session_state(), TORRENT_KEYS)
|
||||||
torrent_dict = proxy.get_torrents_status(torrent_ids, TORRENT_KEYS)
|
|
||||||
|
|
||||||
return [enhance_torrent_status(id, status)
|
return [enhance_torrent_status(id, status)
|
||||||
for id, status in torrent_dict.iteritems()]
|
for id, status in torrent_dict.iteritems()]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue