From fb95d0ef5846a6201206f1616f68a79b2f460f3e Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 1 Oct 2015 12:31:46 +0100 Subject: [PATCH] [Core] Fix queue_top typo in tm.add --- deluge/core/torrentmanager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 63fce1ab1..f6bdcb4c2 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -416,15 +416,16 @@ class TorrentManager(component.Component): # Add to queued torrents set. self.queued_torrents.add(torrent.torrent_id) if self.config["queue_new_to_top"]: - self.queue_top() + self.queue_top(torrent.torrent_id) # Resume the torrent if needed. if not options["add_paused"]: torrent.resume() - # Emit torrent_added signal + # Emit torrent_added signal. from_state = state is not None component.get("EventManager").emit(TorrentAddedEvent(torrent.torrent_id, from_state)) + if log.isEnabledFor(logging.DEBUG): log.debug("Torrent added: %s", str(handle.info_hash())) if log.isEnabledFor(logging.INFO): @@ -434,12 +435,12 @@ class TorrentManager(component.Component): name_and_owner["owner"], from_state and "loaded" or "added") - # Write the .torrent file to the state directory + # Write the .torrent file to the state directory. if filedump: torrent.write_torrentfile(filename, filedump) + # Save the session state. if save_state: - # Save the session state self.save_state() return torrent.torrent_id