mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Don't try to delete file if it doesn't exist
This commit is contained in:
parent
55faba7ed7
commit
ec57f903c9
1 changed files with 2 additions and 1 deletions
|
@ -91,6 +91,7 @@ def is_webp(path):
|
|||
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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue