1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-05 02:32:44 +01:00

[downloader/http] xattr values should be bytes

This commit is contained in:
Yen Chi Hsuan 2016-10-01 19:58:13 +08:00
parent 63e0fd5bcc
commit d54739a2e6
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30

View File

@ -182,7 +182,7 @@ def real_download(self, filename, info_dict):
if self.params.get('xattr_set_filesize', False) and data_len is not None:
try:
write_xattr(tmpfilename, 'user.ytdl.filesize', str(data_len))
write_xattr(tmpfilename, 'user.ytdl.filesize', str(data_len).encode('utf-8'))
except (XAttrUnavailableError, XAttrMetadataError) as err:
self.report_error('unable to set filesize xattr: %s' % str(err))