mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 17:41:01 +01:00
[xattr] Write bytestrings, not characters
This commit is contained in:
parent
496c19234c
commit
42cc71e80b
@ -5,6 +5,7 @@
|
|||||||
from .common import PostProcessor
|
from .common import PostProcessor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
hyphenate_date,
|
hyphenate_date,
|
||||||
|
preferredencoding,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -113,7 +114,8 @@ def write_xattr(path, key, value):
|
|||||||
if infoname == "upload_date":
|
if infoname == "upload_date":
|
||||||
value = hyphenate_date(value)
|
value = hyphenate_date(value)
|
||||||
|
|
||||||
write_xattr(filename, xattrname, value)
|
byte_value = value.encode(preferredencoding())
|
||||||
|
write_xattr(filename, xattrname, byte_value)
|
||||||
|
|
||||||
return True, info
|
return True, info
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user