forgot to re-add the url

This commit is contained in:
Cyberes 2023-02-06 23:07:20 -07:00
parent 397076c90c
commit feea256aa5
2 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,8 @@ parser.add_argument('--download-cache-file-directory', default=user_data_dir('au
parser.add_argument('--silence-errors', '-s', action='store_true', help="Don't print any error messages to the console.")
parser.add_argument('--ignore-downloaded', '-i', action='store_true', help='Ignore videos that have been already downloaded and let youtube-dl handle everything.')
parser.add_argument('--erase-downloaded-tracker', '-e', action='store_true', help='Erase the tracked video file.')
parser.add_argument('--ratelimit-sleep', type=int, default=5, help='How many seconds to sleep to prevent rate-limiting.')
parser.add_argument('--ratelimit-sleep', type=int, default=5,
help='How many seconds to sleep between items to prevent rate-limiting. Does not affect time between videos as you should be fine since it takes a few seconds to merge everything and clean up.')
parser.add_argument('--input-datatype', choices=['auto', 'txt', 'yaml'], default='auto', help='The datatype of the input file. If set to auto, the file will be scanned for a URL on the firstline.'
'If is a URL, the filetype will be set to txt. If it is a key: value pair then the filetype will be set to yaml.')
parser.add_argument('--log-dir', default=None, help='Where to store the logs. Must be set when --output is not.')

View File

@ -92,7 +92,10 @@ def download_video(args) -> dict:
try:
kwargs['ydl_opts']['logger'] = ytdl_logger() # dummy silent logger
yt_dlp = ydl.YDL(kwargs['ydl_opts'])
url = video['url']
video = yt_dlp.sanitize_info(yt_dlp.extract_info(video['url'], download=False))
video['url'] = url
del url
try:
base_path = os.path.splitext(yt_dlp.prepare_filename(video))[0]
except AttributeError: