pause torrent before move and resume afterwards
This commit is contained in:
parent
e4e4ded874
commit
9d85580029
|
@ -94,8 +94,14 @@ class movetorrentMenu:
|
||||||
path = self.dialogs.show_directory_chooser_dialog(None, \
|
path = self.dialogs.show_directory_chooser_dialog(None, \
|
||||||
_("Choose a directory to move files to"))
|
_("Choose a directory to move files to"))
|
||||||
if path:
|
if path:
|
||||||
for unique_id in unique_ids:
|
self.paused_or_not = {}
|
||||||
self.core.move_storage(unique_id, path)
|
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):
|
def configure(self, window):
|
||||||
import os.path
|
import os.path
|
||||||
|
|
Loading…
Reference in New Issue