diff --git a/downloader.py b/downloader.py index 3cb785b..d32bb41 100755 --- a/downloader.py +++ b/downloader.py @@ -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(): diff --git a/process/threads.py b/process/threads.py index c03b887..f2d8284 100644 --- a/process/threads.py +++ b/process/threads.py @@ -96,7 +96,7 @@ def download_video(args) -> dict: output_dict = {'downloaded_video_id': None, 'video_id': video['id'], 'video_critical_err_msg': [], 'video_critical_err_msg_short': [], 'status_msg': [], 'logger_msg': []} # empty object - if not kwargs['ignore_downloaded'] and not video['channel_id'] or not video['channel'] or not video['channel_url'] or 'uploader' not in video.keys(): + if not kwargs['ignore_downloaded'] and not video['channel_id'] or not video['channel'] or not video['channel_url']: if video['duration'] or isinstance(video['view_count'], int): # Sometimes videos don't have channel_id, channel, or channel_url but are actually valid. Like shorts. pass @@ -135,7 +135,7 @@ def download_video(args) -> dict: # We created a new dict video['title'] = unidecode(video['title']) - video['uploader'] = unidecode(video['uploader']) # now the additional info is present since we fetched it + video['uploader'] = unidecode(video['uploader']) # now this info is present since we fetched it video_filename = remove_special_chars_linux(ydl.get_output_templ(video_id=video['id'], title=video['title'], uploader=video['uploader'], uploader_id=video['uploader_id'], include_ext=False), special_chars=['/']) diff --git a/requirements.txt b/requirements.txt index caecef3..af3c228 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ pyyaml appdirs phantomjs unidecode -ffmpeg-python \ No newline at end of file +ffmpeg-python +hurry.filesize \ No newline at end of file