From c383345cd9f82b79a8e31af7e49b4af80e526dc3 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 30 Jul 2009 22:04:23 +0000 Subject: [PATCH] Use the proper download_location when adding a newly created torrent to the session --- deluge/core/core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index 2db886d84..a52f1d41d 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -647,7 +647,9 @@ class Core(component.Component): trackers=trackers) log.debug("torrent created!") if add_to_session: - self.add_torrent_file(os.path.split(target)[1], open(target, "rb").read(), None) + options = {} + options["download_location"] = os.path.split(path)[0] + self.add_torrent_file(os.path.split(target)[1], open(target, "rb").read(), options) @export def upload_plugin(self, filename, plugin_data): @@ -663,7 +665,9 @@ class Core(component.Component): @export def rescan_plugins(self): - """Rescans the plugin folders for new plugins""" + """ + Rescans the plugin folders for new plugins + """ component.get("CorePluginManager").scan_for_plugins() @export