mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-19 00:25:30 +01:00
[MKV Thumbnail Support] Now has the correct file name in MKV container
This commit is contained in:
commit
8c9686906d
|
@ -55,11 +55,15 @@ def run(self, info):
|
||||||
os.remove(encodeFilename(filename))
|
os.remove(encodeFilename(filename))
|
||||||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
elif info['ext'] == 'mkv':
|
elif info['ext'] == 'mkv':
|
||||||
os.rename(encodeFilename(thumbnail_filename), encodeFilename('cover.jpg'))
|
os.rename(encodeFilename(thumbnail_filename), encodeFilename('cover.jpg'))
|
||||||
old_thumbnail_filename = thumbnail_filename
|
old_thumbnail_filename = thumbnail_filename
|
||||||
thumbnail_filename = 'cover.jpg'
|
thumbnail_filename = 'cover.jpg'
|
||||||
|
|
||||||
|
=======
|
||||||
|
if info['ext'] == 'mkv':
|
||||||
|
>>>>>>> a0b2ee64dbe6d4bedad9883cc8014aa77cdd0138
|
||||||
options = [
|
options = [
|
||||||
'-c', 'copy', '-attach', thumbnail_filename, '-metadata:s:t', 'mimetype=image/jpeg']
|
'-c', 'copy', '-attach', thumbnail_filename, '-metadata:s:t', 'mimetype=image/jpeg']
|
||||||
|
|
||||||
|
@ -69,8 +73,11 @@ def run(self, info):
|
||||||
|
|
||||||
if not self._already_have_thumbnail:
|
if not self._already_have_thumbnail:
|
||||||
os.remove(encodeFilename(thumbnail_filename))
|
os.remove(encodeFilename(thumbnail_filename))
|
||||||
|
<<<<<<< HEAD
|
||||||
else:
|
else:
|
||||||
os.rename(encodeFilename(thumbnail_filename), encodeFilename(old_thumbnail_filename))
|
os.rename(encodeFilename(thumbnail_filename), encodeFilename(old_thumbnail_filename))
|
||||||
|
=======
|
||||||
|
>>>>>>> a0b2ee64dbe6d4bedad9883cc8014aa77cdd0138
|
||||||
os.remove(encodeFilename(filename))
|
os.remove(encodeFilename(filename))
|
||||||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user