X-Git-Url: https://gitweb.arthurtaft.net/yt-dlp-wrapper.git/blobdiff_plain/bb6aae7d33e99afed7ffb1ed4bac64acfaa5e188..refs/heads/main:/universal/yt-dlp-wrapper.py diff --git a/universal/yt-dlp-wrapper.py b/universal/yt-dlp-wrapper.py index 66d66b0..91d6773 100644 --- a/universal/yt-dlp-wrapper.py +++ b/universal/yt-dlp-wrapper.py @@ -26,9 +26,9 @@ def batch_convert(): match format: case "audio": - run(['yt-dlp', '-x', '-f', '"ba"', '--audio-format', 'mp3', '-o', f'{audio_title}', '-a', f'{batch_dl_file}']) + run(['yt-dlp', '-x', '-f', 'ba', '--audio-format', 'mp3', '-o', f'{audio_title}', '-a', f'{batch_dl_file}']) case "video": - run(['yt-dlp', '-f', '"bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b"', '--sponsorblock-remove', 'sponsor,selfpromo,interaction', '-o', f'{video_title}', '-a', f'{batch_dl_file}']) + run(['yt-dlp', '-f', 'bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b', '--sponsorblock-remove', 'sponsor,selfpromo,interaction', '-o', f'{video_title}', '-a', f'{batch_dl_file}']) case _: print("Response must be 'Audio' or 'Video'!") @@ -43,7 +43,7 @@ def normal_convert(): match format: case "audio": - run(['yt-dlp', '-x', '-f', '"ba"', '--audio-format', 'mp3', '-o', f'{audio_title}', f'{url}']) + run(['yt-dlp', '-x', '-f', 'ba', '--audio-format', 'wav', '-o', f'{audio_title}', f'{url}']) while val != True: do_continue = str(input("Do you want to convert another file? (y/n): ")).lower() match do_continue: @@ -55,7 +55,7 @@ def normal_convert(): case _: print("Answer must be Y or N!") case "video": - run(['yt-dlp', '-f', '"bv*[ext=mkv]+ba[ext=m4a]/b[ext=mkv] / bv*+ba/b"', '--sponsorblock-remove', 'sponsor,selfpromo,interaction', '-o', f'{video_title}', f'{url}']) + run(['yt-dlp', '-f', 'bv*[ext=mkv]+ba[ext=m4a]/b[ext=mkv] / bv*+ba/b', '--sponsorblock-remove', 'sponsor,selfpromo,interaction', '-o', f'{video_title}', f'{url}']) while val != True: do_continue = str(input("Do you want to convert another file? (y/n): ")).lower() match do_continue: @@ -69,7 +69,7 @@ def normal_convert(): case _: print("Response must be 'Audio' or 'Video'!") -run(['pip', 'install', '-r', f'{requirements}']) +run(['pip', 'install', '--upgrade', '-r', f'{requirements}']) if not audio_dir.exists(): audio_dir.mkdir()