diff options
author | MrDoritos <ianmoore322@gmail.com> | 2020-03-20 17:59:46 -0400 |
---|---|---|
committer | MrDoritos <ianmoore322@gmail.com> | 2020-03-20 17:59:46 -0400 |
commit | 8c9686906d023fdbc32b29ce8156f6193eead0a0 (patch) | |
tree | 6dd13e7b492ff8bf3e8fa22badbfb08bb89577f4 | |
parent | 62566a41b289196d7e9e46498f904e638a033c68 (diff) | |
parent | a0b2ee64dbe6d4bedad9883cc8014aa77cdd0138 (diff) | |
download | hypervideo-pre-8c9686906d023fdbc32b29ce8156f6193eead0a0.tar.lz hypervideo-pre-8c9686906d023fdbc32b29ce8156f6193eead0a0.tar.xz hypervideo-pre-8c9686906d023fdbc32b29ce8156f6193eead0a0.zip |
[MKV Thumbnail Support] Now has the correct file name in MKV container
-rw-r--r-- | youtube_dl/postprocessor/embedthumbnail.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/youtube_dl/postprocessor/embedthumbnail.py index 4393c4e7a..795582259 100644 --- a/youtube_dl/postprocessor/embedthumbnail.py +++ b/youtube_dl/postprocessor/embedthumbnail.py @@ -55,11 +55,15 @@ class EmbedThumbnailPP(FFmpegPostProcessor): os.remove(encodeFilename(filename)) os.rename(encodeFilename(temp_filename), encodeFilename(filename)) +<<<<<<< HEAD elif info['ext'] == 'mkv': os.rename(encodeFilename(thumbnail_filename), encodeFilename('cover.jpg')) old_thumbnail_filename = thumbnail_filename thumbnail_filename = 'cover.jpg' +======= + if info['ext'] == 'mkv': +>>>>>>> a0b2ee64dbe6d4bedad9883cc8014aa77cdd0138 options = [ '-c', 'copy', '-attach', thumbnail_filename, '-metadata:s:t', 'mimetype=image/jpeg'] @@ -69,8 +73,11 @@ class EmbedThumbnailPP(FFmpegPostProcessor): if not self._already_have_thumbnail: os.remove(encodeFilename(thumbnail_filename)) +<<<<<<< HEAD else: os.rename(encodeFilename(thumbnail_filename), encodeFilename(old_thumbnail_filename)) +======= +>>>>>>> a0b2ee64dbe6d4bedad9883cc8014aa77cdd0138 os.remove(encodeFilename(filename)) os.rename(encodeFilename(temp_filename), encodeFilename(filename)) |