[pp/XAttrMetadata] Only set "Where From" on macOS

Authored by: bashonly
pull/13999/head
bashonly 7 days ago
parent b7de89c910
commit fe40e004f9
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

@ -1,4 +1,5 @@
import os
import sys
from .common import PostProcessor
from ..utils import (
@ -54,8 +55,8 @@ class XAttrMetadataPP(PostProcessor):
if infoname == 'upload_date':
value = hyphenate_date(value)
elif xattrname == 'com.apple.metadata:kMDItemWhereFroms':
# NTFS ADS doesn't support colons in names
if os.name == 'nt':
# Colon in xattr name throws errors on Windows/NTFS and Linux
if sys.platform != 'darwin':
continue
value = self.APPLE_PLIST_TEMPLATE % value
write_xattr(info['filepath'], xattrname, value.encode())

Loading…
Cancel
Save