check if any subtitles

This commit is contained in:
Antonio J. Delgado 2025-07-21 09:08:50 +03:00
parent 1be5cb9df4
commit f8656bf5b6

View file

@ -293,9 +293,10 @@ class GetYoutubeVideos:
if video_id not in self.downloaded_items: if video_id not in self.downloaded_items:
video_info = self._get_video_info(video_id) video_info = self._get_video_info(video_id)
downloadable_subtitles = [] downloadable_subtitles = []
for subtitle in self.config['subtitle_langs']: if video_info['subtitles']:
if subtitle in video_info['subtitles']: for subtitle in self.config['subtitle_langs']:
downloadable_subtitles.append(subtitle) if subtitle in video_info['subtitles']:
downloadable_subtitles.append(subtitle)
if not video_info: if not video_info:
break break
info_filename = os.path.join( info_filename = os.path.join(