diff --git a/downloader.py b/downloader.py index d32bb41..66a83af 100755 --- a/downloader.py +++ b/downloader.py @@ -47,7 +47,7 @@ parser.add_argument('--output', required=False, help='Output directory. Ignored parser.add_argument('--no-update', '-n', action='store_true', help='Don\'t update yt-dlp at launch.') parser.add_argument('--max-size', type=int, default=1100, help='Max allowed size of a video in MB.') parser.add_argument('--rm-cache', '-r', action='store_true', help='Delete the yt-dlp cache on start.') -parser.add_argument('--threads', type=int, default=cpu_count(), help='How many download processes to use.') +parser.add_argument('--threads', type=int, default=(cpu_count() - 1), help=f'How many download processes to use. Default: number of CPU cores (for your machine, {cpu_count()}) - 1 = {cpu_count() - 1}') parser.add_argument('--daemon', '-d', action='store_true', help="Run in daemon mode. Disables progress bars sleeps for the amount of time specified in --sleep.") parser.add_argument('--sleep', type=float, default=60, help='How many minutes to sleep when in daemon mode.') parser.add_argument('--download-cache-file-directory', default=user_data_dir('automated-youtube-dl', 'cyberes'), help='The path to the directory to track downloaded videos. Defaults to your appdata path.') @@ -372,7 +372,7 @@ while True: playlist_ydl_opts = ydl_opts.copy() # playlist_ydl_opts['outtmpl'] = f'{output_path}/{get_output_templ()}' - + if len(download_queue): # Don't mess with multiprocessing if all videos are already downloaded with Pool(processes=args.threads) as pool: if sys.stdout.isatty():