diff options
Diffstat (limited to 'module/plugins/hooks/MergeFiles.py')
-rw-r--r-- | module/plugins/hooks/MergeFiles.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py index a7d6fc7ba..dbe7b1f5f 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/hooks/MergeFiles.py @@ -6,13 +6,13 @@ import os import re from module.plugins.internal.Addon import Addon, threaded -from module.utils import save_join as fs_join +from module.plugins.internal.utils import fs_join class MergeFiles(Addon): __name__ = "MergeFiles" __type__ = "hook" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __config__ = [("activated", "bool", "Activated", True)] @@ -37,15 +37,15 @@ class MergeFiles(Addon): files[data['name'][:-4]].sort() fid_dict[data['name']] = fid - download_folder = self.pyload.config.get("general", "download_folder") + dl_folder = self.pyload.config.get("general", "download_folder") if self.pyload.config.get("general", "folder_per_package"): - download_folder = fs_join(download_folder, pack.folder) + dl_folder = fs_join(dl_folder, pack.folder) for name, file_list in files.items(): self.log_info(_("Starting merging of"), name) - with open(fs_join(download_folder, name), "wb") as final_file: + with open(fs_join(dl_folder, name), "wb") as final_file: for splitted_file in file_list: self.log_debug("Merging part", splitted_file) @@ -54,9 +54,9 @@ class MergeFiles(Addon): pyfile.setStatus("processing") try: - with open(fs_join(download_folder, splitted_file), "rb") as s_file: + with open(fs_join(dl_folder, splitted_file), "rb") as s_file: size_written = 0 - s_file_size = int(os.path.getsize(os.path.join(download_folder, splitted_file))) + s_file_size = int(os.path.getsize(os.path.join(dl_folder, splitted_file))) while True: f_buffer = s_file.read(self.BUFFER_SIZE) if f_buffer: |