diff --git a/amt/server.py b/amt/server.py index f87df68..5f95f0c 100644 --- a/amt/server.py +++ b/amt/server.py @@ -710,7 +710,7 @@ def download_chapter(self, media_data, chapter_data, **kwargs): page_paths = self.download_pages(media_data, chapter_data, **kwargs) self.post_download(media_data, chapter_data, page_paths=page_paths) - self.settings.post_process(media_data, page_paths, self.settings.get_media_dir(media_data)) + self.settings.post_process(media_data, page_paths, dir_path) self.mark_download_complete(media_data, chapter_data) self.logger.info("%s %d %s is downloaded; Total pages %d", media_data["name"], chapter_data["number"], chapter_data["title"], len(page_paths)) diff --git a/amt/settings.py b/amt/settings.py index 3886536..085d025 100644 --- a/amt/settings.py +++ b/amt/settings.py @@ -385,4 +385,4 @@ def open_viewer(self, raw_files, server_media_chapters, raw_viewer=False): def post_process(self, media_data, file_paths, dir_path): cmd = self.get_field("post_process_cmd", media_data) if cmd: - self.run_cmd(cmd.format(files=" ".join(map(Settings._smart_quote, file_paths)), wd=dir_path, raiseException=True)) + self.run_cmd(cmd.format(files=" ".join(map(Settings._smart_quote, file_paths))), wd=dir_path, raiseException=True)