1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-06-25 00:38:03 +02:00

[EmbedSubtitle] Continue even if some files are missing

This commit is contained in:
pukkandan 2021-09-01 08:45:56 +05:30
parent e88dabb35e
commit 8e25d624df
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -478,6 +478,9 @@ def run(self, information):
mp4_ass_warn = False
for lang, sub_info in subtitles.items():
if not os.path.exists(information.get('filepath', '')):
self.report_warning(f'Skipping embedding {lang} subtitle because the file is missing')
continue
sub_ext = sub_info['ext']
if sub_ext == 'json':
self.report_warning('JSON subtitles cannot be embedded')