add an "as_...
Content-type: text/plain
Author: damoxc
Revision: 5001
Log:
remove get_torrent_info from ui.common
add an "as_dict" method to TorrentInfo
utilise the TorrentInfo class rather than get_torrent_info
Diff:
Modified: trunk/deluge/ui/web/js/deluge-add.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-add.js 2009-04-02 20:40:24 UTC (rev
5000)
+++ trunk/deluge/ui/web/js/deluge-add.js 2009-04-02 20:55:46 UTC (rev
5001)
@@ -93,7 +93,7 @@
this.clearFiles();
var root = this.Files.getRootNode();
- walk(torrentInfo['files'], root);
+ walk(torrentInfo['files_tree'], root);
root.firstChild.expand();
},
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py 2009-04-02 20:40:24 UTC (rev 5000)
+++ trunk/deluge/ui/web/json_api.py 2009-04-02 20:55:46 UTC (rev 5001)
@@ -397,7 +397,8 @@
"""
d = Deferred()
try:
- d.callback(uicommon.get_torrent_info(filename.strip()))
+ torrent_info = uicommon.TorrentInfo(filename.strip())
+ d.callback(torrent_info.as_dict("name", "info_hash", "files_tree"))
except:
d.callback(False)
return d
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---