check if requested subs
This commit is contained in:
parent
0e800d0c0b
commit
918ecc5df4
1 changed files with 13 additions and 7 deletions
|
@ -436,15 +436,21 @@ class GetYoutubeVideos:
|
|||
)
|
||||
else:
|
||||
language = subtitle_match.group(1)
|
||||
if language in ydl_opts['subtitleslangs']:
|
||||
self._log.warning(
|
||||
f"The language '{language}' is not available, removing from list: {', '.join(ydl_opts['subtitleslangs'])}"
|
||||
)
|
||||
ydl_opts['subtitleslangs'].remove(language)
|
||||
download_result = 'retrying (subtitles failure)'
|
||||
if 'subtitleslangs' in ydl_opts:
|
||||
if language in ydl_opts['subtitleslangs']:
|
||||
self._log.warning(
|
||||
f"The language '{language}' is not available, removing from list: {', '.join(ydl_opts['subtitleslangs'])}"
|
||||
)
|
||||
ydl_opts['subtitleslangs'].remove(language)
|
||||
download_result = 'retrying (subtitles failure)'
|
||||
else:
|
||||
self._log.error(
|
||||
f"The language '{language}' is not available, but is not present in list: {', '.join(ydl_opts['subtitleslangs'])}"
|
||||
)
|
||||
download_result = 'error'
|
||||
else:
|
||||
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 didn't request subtitles?!?!"
|
||||
)
|
||||
download_result = 'error'
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue