Restored tagging functionality

This commit is contained in:
Jonas Winkler 2018-09-27 20:41:16 +02:00
parent 7257cece30
commit b347e3347d

6
src/documents/consumer.py Normal file → Executable file
View File

@ -221,6 +221,12 @@ class Consumer:
storage_type=self.storage_type
)
relevant_tags = set(file_info.tags)
if relevant_tags:
tag_names = ", ".join([t.slug for t in relevant_tags])
self.log("debug", "Tagging with {}".format(tag_names))
document.tags.add(*relevant_tags)
self._write(document, doc, document.source_path)
self._write(document, thumbnail, document.thumbnail_path)