Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Laharah committed Mar 5, 2016
2 parents ee33cee + 3c39ba2 commit 0a521cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions filebottool/core.py
Expand Up @@ -276,10 +276,11 @@ def _redirect_torrent_paths(self, torrent_id, (new_save_path, new_top_lvl,
self.listening_dictionary[torrent_id]["move_storage"] = new_save_path
torrent.move_storage(new_save_path)
if new_top_lvl:
current_top_lvl = torrent.get_files()[0]["path"].split("/")[0] + "/"
self.listening_dictionary[torrent_id]["folder_rename"] = (
current_top_lvl, new_top_lvl + "/")
torrent.rename_folder(current_top_lvl, new_top_lvl)
if len(torrent.get_files()) > 1:
current_top_lvl = torrent.get_files()[0]["path"].split("/")[0] + "/"
self.listening_dictionary[torrent_id]["folder_rename"] = (
current_top_lvl, new_top_lvl + "/")
torrent.rename_folder(current_top_lvl, new_top_lvl)
if new_file_paths:
for index, path in new_file_paths:
self.listening_dictionary[torrent_id][index] = True
Expand Down

0 comments on commit 0a521cb

Please sign in to comment.