pause torrent before move and resume afterwards

This commit is contained in:
Marcos Pinto 2007-09-17 09:55:48 +00:00
parent e4e4ded874
commit 9d85580029
1 changed files with 8 additions and 2 deletions

View File

@ -94,8 +94,14 @@ class movetorrentMenu:
path = self.dialogs.show_directory_chooser_dialog(None, \
_("Choose a directory to move files to"))
if path:
for unique_id in unique_ids:
self.core.move_storage(unique_id, path)
self.paused_or_not = {}
for unique_id in unique_ids:
self.paused_or_not[unique_id] = self.core.is_user_paused(unique_id)
if not self.paused_or_not[unique_id]:
self.core.set_user_pause(unique_id, True, enforce_queue=False)
self.core.move_storage(unique_id, path)
if not self.paused_or_not[unique_id]:
self.core.set_user_pause(unique_id, False, enforce_queue=False)
def configure(self, window):
import os.path