diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-29 07:18:36 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-29 07:39:33 +0530 |
commit | 1d485a1a799bbeeb2faea0595676ca7d4c0f3716 (patch) | |
tree | 17e1f06c8a4e3a1fa8083c2017812988e6acc8f5 /yt_dlp/postprocessor/xattrpp.py | |
parent | 0a41f331cc3e06007b8d1abe104da196c565b505 (diff) | |
download | hypervideo-pre-1d485a1a799bbeeb2faea0595676ca7d4c0f3716.tar.lz hypervideo-pre-1d485a1a799bbeeb2faea0595676ca7d4c0f3716.tar.xz hypervideo-pre-1d485a1a799bbeeb2faea0595676ca7d4c0f3716.zip |
[cleanup] Misc fixes
Closes #3565, https://github.com/yt-dlp/yt-dlp/issues/3514#issuecomment-1105944364
Diffstat (limited to 'yt_dlp/postprocessor/xattrpp.py')
-rw-r--r-- | yt_dlp/postprocessor/xattrpp.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/yt_dlp/postprocessor/xattrpp.py b/yt_dlp/postprocessor/xattrpp.py index 3c431941b..d6ac9b876 100644 --- a/yt_dlp/postprocessor/xattrpp.py +++ b/yt_dlp/postprocessor/xattrpp.py @@ -1,3 +1,5 @@ +import os + from .common import PostProcessor from ..compat import compat_os_name from ..utils import ( @@ -28,6 +30,7 @@ class XAttrMetadataPP(PostProcessor): self.to_screen('Writing metadata to file\'s xattrs') filename = info['filepath'] + mtime = os.stat(filename).st_mtime try: xattr_mapping = { @@ -53,8 +56,6 @@ class XAttrMetadataPP(PostProcessor): write_xattr(filename, xattrname, byte_value) num_written += 1 - return [], info - except XAttrUnavailableError as e: raise PostProcessingError(str(e)) @@ -73,4 +74,6 @@ class XAttrMetadataPP(PostProcessor): else: msg += '(You may have to enable them in your /etc/fstab)' raise PostProcessingError(str(e)) - return [], info + + self.try_utime(filename, mtime, mtime) + return [], info |