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)
|
video_id=result.group(1)
|
||||||
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 = []
|
||||||
|
for subtitle in self.config['subtitle_langs']:
|
||||||
|
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(
|
||||||
|
@ -375,7 +379,7 @@ class GetYoutubeVideos:
|
||||||
'writethumbnail': True,
|
'writethumbnail': True,
|
||||||
'writeinfojson': True,
|
'writeinfojson': True,
|
||||||
'subtitlesformat': 'srt',
|
'subtitlesformat': 'srt',
|
||||||
'subtitleslangs': self.config['subtitle_langs'],
|
'subtitleslangs': downloadable_subtitles,
|
||||||
'allow_multiple_audio_streams': True,
|
'allow_multiple_audio_streams': True,
|
||||||
'noprogress': True,
|
'noprogress': True,
|
||||||
'merge_output_format': 'mkv',
|
'merge_output_format': 'mkv',
|
||||||
|
|
Loading…
Reference in a new issue