mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-23 08:12:28 +00:00
[xattr] Write bytestrings, not characters
This commit is contained in:
parent
496c19234c
commit
42cc71e80b
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@ import sys
|
|||
from .common import PostProcessor
|
||||
from ..utils import (
|
||||
hyphenate_date,
|
||||
preferredencoding,
|
||||
)
|
||||
|
||||
|
||||
|
@ -113,7 +114,8 @@ class XAttrMetadataPP(PostProcessor):
|
|||
if infoname == "upload_date":
|
||||
value = hyphenate_date(value)
|
||||
|
||||
write_xattr(filename, xattrname, value)
|
||||
byte_value = value.encode(preferredencoding())
|
||||
write_xattr(filename, xattrname, byte_value)
|
||||
|
||||
return True, info
|
||||
|
||||
|
|
Loading…
Reference in a new issue