diff --git a/deluge/ui/web/js/deluge-add.js b/deluge/ui/web/js/deluge-add.js index d0c50a3bc..175e960fc 100644 --- a/deluge/ui/web/js/deluge-add.js +++ b/deluge/ui/web/js/deluge-add.js @@ -93,7 +93,7 @@ Deluge.Add = { this.clearFiles(); var root = this.Files.getRootNode(); - walk(torrentInfo['files'], root); + walk(torrentInfo['files_tree'], root); root.firstChild.expand(); }, diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index 71f3cd426..d4c61fb92 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -397,7 +397,8 @@ class WebApi(JSONComponent): """ 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