mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2025-06-05 21:49:13 +02:00
Don't try to delete file if it doesn't exist
This commit is contained in:
@@ -91,6 +91,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
||||
elif info['ext'] == 'mkv':
|
||||
old_thumbnail_filename = thumbnail_filename
|
||||
thumbnail_filename = os.path.join(os.path.dirname(old_thumbnail_filename), 'cover.jpg')
|
||||
if os.path.exists(thumbnail_filename):
|
||||
os.remove(encodeFilename(thumbnail_filename))
|
||||
os.rename(encodeFilename(old_thumbnail_filename), encodeFilename(thumbnail_filename))
|
||||
|
||||
|
Reference in New Issue
Block a user