mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-26 02:55:17 +00:00
Merge pull request #207 from pukkandan/thumbnail-rename
[ffmpeg] Fix for os.rename error when embedding thumbnail to video in a different drive on windows
This commit is contained in:
commit
6248b34ad2
1 changed files with 4 additions and 2 deletions
|
@ -89,9 +89,11 @@ def is_webp(path):
|
||||||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||||
|
|
||||||
elif info['ext'] == 'mkv':
|
elif info['ext'] == 'mkv':
|
||||||
os.rename(encodeFilename(thumbnail_filename), encodeFilename('cover.jpg'))
|
|
||||||
old_thumbnail_filename = thumbnail_filename
|
old_thumbnail_filename = thumbnail_filename
|
||||||
thumbnail_filename = 'cover.jpg'
|
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))
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
'-c', 'copy', '-map', '0',
|
'-c', 'copy', '-map', '0',
|
||||||
|
|
Loading…
Reference in a new issue