webui:torrent_list:use sclient.get_torrents_status instead of async

This commit is contained in:
Martijn Voncken 2008-02-25 17:44:32 +00:00
parent 9c0dc5f9e3
commit d1b8075fe6
2 changed files with 5 additions and 10 deletions

View File

@ -14,7 +14,6 @@ $for group in groups:
$else:
<li><a href="/config/$page">$pages[page].title</a></li>
</ul>
</div>
<!--form block-->
<div class="panel" id="config_panel">
@ -31,8 +30,6 @@ $if error:
<input type="submit" name="submit" id="submit" value='$_("Save")'>
</form>
</div>

View File

@ -232,14 +232,12 @@ def get_torrent_status(torrent_id):
def get_torrent_list():
"""
uses async.
returns a list of storified-torrent-dicts.
"""
torrent_ids = proxy.get_session_state() #Syc-api.
torrent_dict = {}
for id in torrent_ids:
async_proxy.get_torrent_status(dict_cb(id,torrent_dict), id,
TORRENT_KEYS)
async_proxy.force_call(block=True)
torrent_ids = proxy.get_session_state()
torrent_dict = proxy.get_torrents_status(torrent_ids, TORRENT_KEYS)
return [enhance_torrent_status(id, status)
for id, status in torrent_dict.iteritems()]