mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Fix for os.rename error when embedding thumbnail to video in a different drive
This commit is contained in:
parent
d052b9a112
commit
55faba7ed7
1 changed files with 3 additions and 2 deletions
|
@ -89,9 +89,10 @@ def is_webp(path):
|
|||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||
|
||||
elif info['ext'] == 'mkv':
|
||||
os.rename(encodeFilename(thumbnail_filename), encodeFilename('cover.jpg'))
|
||||
old_thumbnail_filename = thumbnail_filename
|
||||
thumbnail_filename = 'cover.jpg'
|
||||
thumbnail_filename = os.path.join(os.path.dirname(old_thumbnail_filename), 'cover.jpg')
|
||||
os.remove(encodeFilename(thumbnail_filename))
|
||||
os.rename(encodeFilename(old_thumbnail_filename), encodeFilename(thumbnail_filename))
|
||||
|
||||
options = [
|
||||
'-c', 'copy', '-attach', thumbnail_filename, '-metadata:s:t', 'mimetype=image/jpeg']
|
||||
|
|
Loading…
Reference in a new issue