diff options
author | sepro <sepro@sepr0.com> | 2024-11-17 00:24:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-17 00:24:11 +0100 |
commit | f95a92b3d0169a784ee15a138fbe09d82b2754a1 (patch) | |
tree | fa1e62aceeea805b1f8ed79ec810ee904aaf1b10 /yt_dlp/postprocessor/embedthumbnail.py | |
parent | 1d253b0a27110d174c40faf8fb1c999d099e0cde (diff) |
[cleanup] Deprecate more compat functions (#11439)
Authored by: seproDev
Diffstat (limited to 'yt_dlp/postprocessor/embedthumbnail.py')
-rw-r--r-- | yt_dlp/postprocessor/embedthumbnail.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py index 16c8bcdda..d8ba220ca 100644 --- a/yt_dlp/postprocessor/embedthumbnail.py +++ b/yt_dlp/postprocessor/embedthumbnail.py @@ -12,7 +12,6 @@ from ..utils import ( PostProcessingError, check_executable, encodeArgument, - encodeFilename, prepend_extension, shell_quote, ) @@ -68,7 +67,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): self.to_screen('There are no thumbnails on disk') return [], info thumbnail_filename = info['thumbnails'][idx]['filepath'] - if not os.path.exists(encodeFilename(thumbnail_filename)): + if not os.path.exists(thumbnail_filename): self.report_warning('Skipping embedding the thumbnail because the file is missing.') return [], info @@ -85,7 +84,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): thumbnail_filename = convertor.convert_thumbnail(thumbnail_filename, 'png') thumbnail_ext = 'png' - mtime = os.stat(encodeFilename(filename)).st_mtime + mtime = os.stat(filename).st_mtime success = True if info['ext'] == 'mp3': @@ -154,12 +153,12 @@ class EmbedThumbnailPP(FFmpegPostProcessor): else: if not prefer_atomicparsley: self.to_screen('mutagen was not found. Falling back to AtomicParsley') - cmd = [encodeFilename(atomicparsley, True), - encodeFilename(filename, True), + cmd = [atomicparsley, + filename, encodeArgument('--artwork'), - encodeFilename(thumbnail_filename, True), + thumbnail_filename, encodeArgument('-o'), - encodeFilename(temp_filename, True)] + temp_filename] cmd += [encodeArgument(o) for o in self._configuration_args('AtomicParsley')] self._report_run('atomicparsley', filename) |