Fix #2021 : Share ratio limit not obeyed for torrents downloaded outside deluge

Share ratio limit is based upon torrent.is_finished and a seeded torrent added
to the session was not set after checking.
This commit is contained in:
Calum Lind 2012-02-27 15:09:21 +00:00
parent 8db789ffe2
commit e7dada6afc

View File

@ -875,9 +875,9 @@ class TorrentManager(component.Component):
if torrent.options["download_location"] != move_path:
torrent.move_storage(move_path)
torrent.is_finished = True
component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))
torrent.is_finished = torrent.handle.is_seed()
torrent.update_state()
# Only save resume data if it was actually downloaded something. Helps