aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/postprocessor/xattrpp.py
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2018-01-14 00:50:11 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2018-01-14 00:50:11 +0100
commitb382d0f71eeece4e6e1cc3662f3c89884d5ac05d (patch)
treee48661b9f1de2380d4bff94f416624827746abd7 /youtube_dl/postprocessor/xattrpp.py
parent5020cb7e8233683ef7845fea1233a95f3f775a7b (diff)
parenta86922c4702e2c8538337124c5bf02a4b5f9aa4a (diff)
downloadyoutube-dl-b382d0f71eeece4e6e1cc3662f3c89884d5ac05d.zip
youtube-dl-b382d0f71eeece4e6e1cc3662f3c89884d5ac05d.tar.gz
youtube-dl-b382d0f71eeece4e6e1cc3662f3c89884d5ac05d.tar.bz2
Merge branch 'upstream'
Diffstat (limited to 'youtube_dl/postprocessor/xattrpp.py')
-rw-r--r--youtube_dl/postprocessor/xattrpp.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/postprocessor/xattrpp.py b/youtube_dl/postprocessor/xattrpp.py
index fbdfa02..b0aed9c 100644
--- a/youtube_dl/postprocessor/xattrpp.py
+++ b/youtube_dl/postprocessor/xattrpp.py
@@ -42,6 +42,7 @@ class XAttrMetadataPP(PostProcessor):
'user.dublincore.format': 'format',
}
+ num_written = 0
for xattrname, infoname in xattr_mapping.items():
value = info.get(infoname)
@@ -52,6 +53,7 @@ class XAttrMetadataPP(PostProcessor):
byte_value = value.encode('utf-8')
write_xattr(filename, xattrname, byte_value)
+ num_written += 1
return [], info
@@ -62,8 +64,8 @@ class XAttrMetadataPP(PostProcessor):
except XAttrMetadataError as e:
if e.reason == 'NO_SPACE':
self._downloader.report_warning(
- 'There\'s no disk space left or disk quota exceeded. ' +
- 'Extended attributes are not written.')
+ 'There\'s no disk space left, disk quota exceeded or filesystem xattr limit exceeded. ' +
+ (('Some ' if num_written else '') + 'extended attributes are not written.').capitalize())
elif e.reason == 'VALUE_TOO_LONG':
self._downloader.report_warning(
'Unable to write extended attributes due to too long values.')