smarnach / pyexiftool

a Python library to communicate with an instance of Phil Harvey's excellent ExifTool command-line application.
Other
270 stars 111 forks source link

Using get_tags_batch() always includes the SourceFile field #17

Closed mairsbw closed 8 years ago

mairsbw commented 8 years ago

This makes it difficult to easily serialize the output of the return values for use with CSV or the like. I did not expect this in the returned dictionary, and it's not specified in the comments. It should be at least specified in the comments, but I would also argue that it shouldn't be added to the returned data and this function should only return explicitly-requested fields.

smarnach commented 8 years ago

@mairsbw This library is just a wrapper for the ExifTool command-line application. The library will return whatever ExifTool returns, and it happens to include the SourceFile key. I don't disagree with that decision.

It's also trivial to remove the field. Just iterate over the list returned by get_tags_batch() and call d.pop("SourceFile") on each item.