rg3/youtube-dl — pull request #2028 by epitron (2013-12-22 09:33:52+00:00)
Title: New '--xattrs' option which writes metadata to the file's extended attributes.

I think you guys are going to like this final version of my xattr writer. It works great, and it solves all of your previous objections.

It's implemented as a postprocessor (`XAttrMetadataPP`), so it's nice and clean. It doesn't load `pyxattr` or search your path for `setfattr` unless you pass the `--xattrs` option to youtube-dl.

(There is one little hitch, which is that if you use the `--extract-audio` option, the metadata only gets added to the last file in the post-processing chain (the audio file). If the user wants to keep the video, the metadata should be added there as well. I could solve that by adding the xattrs-postprocessor after every postprocessor which outputs a new file... seems a big ugly though.)