fix reslts

This commit is contained in:
Antonio J. Delgado 2025-08-10 12:23:13 +03:00
parent d79fcee4e9
commit b54fcb68e1

View file

@ -413,7 +413,7 @@ class GetYoutubeVideos:
"Requested format is not available, trying best format." "Requested format is not available, trying best format."
) )
ydl_opts['format'] = 'bestvideo+bestaudio[ext=m4a]/best' ydl_opts['format'] = 'bestvideo+bestaudio[ext=m4a]/best'
download_result = 'retrying (format error)' download_result = 'retrying (format failure)'
elif 'Unable to download video subtitles for' in f"{error}": elif 'Unable to download video subtitles for' in f"{error}":
regex = r"Unable to download video subtitles for '([a-z]*)'" regex = r"Unable to download video subtitles for '([a-z]*)'"
subtitle_match = re.search( subtitle_match = re.search(
@ -431,7 +431,7 @@ class GetYoutubeVideos:
f"The language '{language}' is not available, removing from list: {', '.join(ydl_opts['subtitleslangs'])}" f"The language '{language}' is not available, removing from list: {', '.join(ydl_opts['subtitleslangs'])}"
) )
ydl_opts['subtitleslangs'].remove(language) ydl_opts['subtitleslangs'].remove(language)
download_result = 'retrying (subtitles error)' download_result = 'retrying (subtitles failure)'
else: else:
self._log.error( self._log.error(
f"The language '{language}' is not available, but is not present in list: {', '.join(ydl_opts['subtitleslangs'])}" f"The language '{language}' is not available, but is not present in list: {', '.join(ydl_opts['subtitleslangs'])}"