get only existing subs
This commit is contained in:
parent
643856a01b
commit
8725d7109f
1 changed files with 5 additions and 1 deletions
|
@ -292,6 +292,10 @@ class GetYoutubeVideos:
|
|||
video_id=result.group(1)
|
||||
if video_id not in self.downloaded_items:
|
||||
video_info = self._get_video_info(video_id)
|
||||
downloadable_subtitles = []
|
||||
for subtitle in self.config['subtitle_langs']:
|
||||
if subtitle in video_info['subtitles']:
|
||||
downloadable_subtitles.append(subtitle)
|
||||
if not video_info:
|
||||
break
|
||||
info_filename = os.path.join(
|
||||
|
@ -375,7 +379,7 @@ class GetYoutubeVideos:
|
|||
'writethumbnail': True,
|
||||
'writeinfojson': True,
|
||||
'subtitlesformat': 'srt',
|
||||
'subtitleslangs': self.config['subtitle_langs'],
|
||||
'subtitleslangs': downloadable_subtitles,
|
||||
'allow_multiple_audio_streams': True,
|
||||
'noprogress': True,
|
||||
'merge_output_format': 'mkv',
|
||||
|
|
Loading…
Reference in a new issue