From 57f6ae434273db7b69bab631e6782a1498bcd846 Mon Sep 17 00:00:00 2001 From: 7x11x13 Date: Fri, 27 Dec 2024 13:47:29 -0500 Subject: [PATCH] Error handling --- yt_dlp/postprocessor/ffmpeg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index b29cd1d93..b029f1289 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -826,6 +826,8 @@ class FFmpegMetadataPP(FFmpegPostProcessor): self.to_screen(f'Adding metadata to "{filename}"') try: f = mutagen.File(filename) + if f is None: + raise TypeError(f'Mutagen unable to determine type of file: {info["ext"]}') self._assemble_metadata(f, metadata) f.save() except Exception as err: