Skip to content

A feature-rich command-line audio/video downloader

[embedthumbnail] Fix bug with deleting original thumbnail (Closes #113)

pukkandan0e0040519bf5
diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py
index 926673363b..cc6cd1c8ec 100644
--- a/yt_dlp/postprocessor/embedthumbnail.py
+++ b/yt_dlp/postprocessor/embedthumbnail.py
@@ -193,4 +193,6 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
info['__thumbnail_filename'], os.path.splitext(original_thumbnail)[1][1:])
if original_thumbnail == thumbnail_filename:
files_to_delete = []
+ elif original_thumbnail != thumbnail_filename:
+ files_to_delete.append(original_thumbnail)
return files_to_delete, info