diff --git a/Loader.py b/Loader.py index c028f78..6d3492a 100644 --- a/Loader.py +++ b/Loader.py @@ -60,9 +60,9 @@ def download(anime: Anime): # pylint: disable=too-many-branches try: subprocess.run(command, check=True, timeout=timeout) except subprocess.TimeoutExpired: - logging.error(f"Download timed out after {timeout} seconds: {' '.join(str(item) for item in command)}") + download_error_logger.error(f"Download timed out after {timeout} seconds: {' '.join(str(item) for item in command)}") except subprocess.CalledProcessError: - logging.error(f"Error running command: {' '.join(str(item) for item in command)}") + download_error_logger.error(f"Error running command: {' '.join(str(item) for item in command)}") except KeyboardInterrupt: logging.warning("Download interrupted by user.") output_dir = os.path.dirname(output_path) diff --git a/main.py b/main.py index ba2d707..8afb714 100644 --- a/main.py +++ b/main.py @@ -168,7 +168,7 @@ class Loader: logging.error(f"Error downloading episode {episode} of season {season} for anime {key}: {e}") # Using ThreadPoolExecutor to run downloads in parallel - with ThreadPoolExecutor(max_workers=5) as executor: # Adjust number of workers as needed + with ThreadPoolExecutor(max_workers=2) as executor: # Adjust number of workers as needed for folder, mp4_files in result: try: key = self.__check_and_generate_key(folder)