diff options
author | Jesús <heckyel@hyperbola.info> | 2021-12-29 19:12:28 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-12-29 19:12:28 -0500 |
commit | 5aac4e0267e32d98eb68692afedafda3b41ea629 (patch) | |
tree | c3b0f52d6a8cf4ad74e7f17f1ccd7653e1071471 /yt_dlp/postprocessor/ffmpeg.py | |
parent | 4f0875462ee497cc13c02d0b852f52f4887b5cea (diff) | |
parent | 96f13f01a609add83555ca86fbf35d11441361d8 (diff) | |
download | hypervideo-pre-5aac4e0267e32d98eb68692afedafda3b41ea629.tar.lz hypervideo-pre-5aac4e0267e32d98eb68692afedafda3b41ea629.tar.xz hypervideo-pre-5aac4e0267e32d98eb68692afedafda3b41ea629.zip |
updated from upstream | 29/12/2021 at 19:12
Diffstat (limited to 'yt_dlp/postprocessor/ffmpeg.py')
-rw-r--r-- | yt_dlp/postprocessor/ffmpeg.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 594762974..96b48ded5 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -296,8 +296,8 @@ class FFmpegPostProcessor(PostProcessor): keys = ['_%s%d' % (name, number), '_%s' % name] if name == 'o': args += ['-movflags', '+faststart'] - elif number == 1: - keys.append('') + if number == 1: + keys.append('') args += self._configuration_args(self.basename, keys) if name == 'i': args.append('-i') @@ -1092,12 +1092,12 @@ class FFmpegThumbnailsConvertorPP(FFmpegPostProcessor): files_to_delete = [] has_thumbnail = False - for idx, thumbnail_dict in enumerate(info['thumbnails']): - if 'filepath' not in thumbnail_dict: + for idx, thumbnail_dict in enumerate(info.get('thumbnails') or []): + original_thumbnail = thumbnail_dict.get('filepath') + if not original_thumbnail: continue has_thumbnail = True self.fixup_webp(info, idx) - original_thumbnail = thumbnail_dict['filepath'] _, thumbnail_ext = os.path.splitext(original_thumbnail) if thumbnail_ext: thumbnail_ext = thumbnail_ext[1:].lower() |