From 41bedda10a38c10eaac8bf68bec95654298d081c Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 17 Oct 2008 18:22:18 +0000 Subject: [PATCH] Updates for rename_folder --- deluge/core/torrent.py | 3 ++- deluge/ui/client.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index d348155ee..c4add491c 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -806,9 +806,10 @@ class Torrent: def rename_folder(self, folder, new_folder): """Renames a folder within a torrent. This basically does a file rename on all of the folders children.""" + log.debug("attempting to rename folder: %s to %s", folder, new_folder) for f in self.get_files(): if f["path"].startswith(folder): # Keep a list of filerenames we're waiting on self.waiting_on_folder_rename.append(f["index"]) self.handle.rename_file(f["index"], f["path"].replace(folder, new_folder, 1)) - + diff --git a/deluge/ui/client.py b/deluge/ui/client.py index c793bbb76..f2798860d 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -170,7 +170,8 @@ class BaseClient(object): "set_torrent_stop_ratio", "set_torrent_stop_at_ratio", "set_torrent_remove_at_ratio", "set_torrent_move_on_completed", "set_torrent_move_on_completed_path", "add_torrent_magnets", - "create_torrent", "upload_plugin", "rescan_plugins", "rename_files"] + "create_torrent", "upload_plugin", "rescan_plugins", "rename_files", + "rename_folder"] def __init__(self): self.core = _core