add option for all subtitles
This commit is contained in:
parent
fccb5ec955
commit
69e64bad83
1 changed files with 6 additions and 3 deletions
|
@ -283,9 +283,12 @@ class GetYoutubeVideos:
|
||||||
if not video_info:
|
if not video_info:
|
||||||
break
|
break
|
||||||
if video_info['subtitles']:
|
if video_info['subtitles']:
|
||||||
for subtitle in self.config['subtitle_langs']:
|
if self.config['subtitle_langs'] == 'all':
|
||||||
if subtitle in video_info['subtitles']:
|
downloadable_subtitles = video_info['subtitles']
|
||||||
downloadable_subtitles.append(subtitle)
|
else:
|
||||||
|
for subtitle in self.config['subtitle_langs']:
|
||||||
|
if subtitle in video_info['subtitles']:
|
||||||
|
downloadable_subtitles.append(subtitle)
|
||||||
info_filename = os.path.join(
|
info_filename = os.path.join(
|
||||||
self.config['download_dir'],
|
self.config['download_dir'],
|
||||||
f"{video_id}.json"
|
f"{video_id}.json"
|
||||||
|
|
Loading…
Reference in a new issue