mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-30 20:27:54 +01:00
fix os.utime() syntax
modified: youtube_dl/postprocessor/embedthumbnail.py
This commit is contained in:
parent
4b3dbbae52
commit
6f45cf5f7b
@ -55,7 +55,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
|||||||
os.remove(encodeFilename(thumbnail_filename))
|
os.remove(encodeFilename(thumbnail_filename))
|
||||||
os.remove(encodeFilename(filename))
|
os.remove(encodeFilename(filename))
|
||||||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||||
os.utime(encodeFilename(filename, timestamp))
|
os.utime(encodeFilename(filename), (timestamp, timestamp))
|
||||||
|
|
||||||
elif info['ext'] in ['m4a', 'mp4']:
|
elif info['ext'] in ['m4a', 'mp4']:
|
||||||
if not check_executable('AtomicParsley', ['-v']):
|
if not check_executable('AtomicParsley', ['-v']):
|
||||||
@ -91,7 +91,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
|
|||||||
else:
|
else:
|
||||||
os.remove(encodeFilename(filename))
|
os.remove(encodeFilename(filename))
|
||||||
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
os.rename(encodeFilename(temp_filename), encodeFilename(filename))
|
||||||
os.utime(encodeFilename(filename, timestamp))
|
os.utime(encodeFilename(filename), (timestamp, timestamp))
|
||||||
else:
|
else:
|
||||||
raise EmbedThumbnailPPError('Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.')
|
raise EmbedThumbnailPPError('Only mp3 and m4a/mp4 are supported for thumbnail embedding for now.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user