mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
pause torrent before move and resume afterwards
This commit is contained in:
parent
e4e4ded874
commit
9d85580029
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue