1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-31 01:52:52 +08:00

[xattr] Write bytestrings, not characters

This commit is contained in:
Philipp Hagemeister 2014-01-07 06:11:21 +01:00
parent 496c19234c
commit 42cc71e80b

View File

@ -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