1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 09:12:40 +01:00

Don't try to write the subtitles if it's None

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-20 12:59:47 +02:00
parent 2f799533ae
commit 6804038d06

View File

@ -494,6 +494,8 @@ def process_info(self, info_dict):
sub_format = self.params.get('subtitlesformat')
for sub_lang in subtitles.keys():
sub = subtitles[sub_lang]
if sub is None:
continue
try:
sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format
self.report_writesubtitles(sub_filename)