1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-21 23:33:10 +00:00

Don't try to delete file if it doesn't exist

This commit is contained in:
pukkandan 2020-11-15 04:18:39 +05:30
parent 55faba7ed7
commit ec57f903c9

View file

@ -91,7 +91,8 @@ 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')
os.remove(encodeFilename(thumbnail_filename))
if os.path.exists(thumbnail_filename):
os.remove(encodeFilename(thumbnail_filename))
os.rename(encodeFilename(old_thumbnail_filename), encodeFilename(thumbnail_filename))
options = [