refactor(metadata): simplify category and tag handling in CbxMetadata Extractor (#967)

This commit is contained in:
brios
2026-04-28 16:48:23 +02:00
committed by GitHub
parent f359e49a6b
commit 792f519cd4
@@ -132,14 +132,12 @@ public class CbxMetadataExtractor implements FileMetadataExtractor {
builder.authors(authors);
}
Set<String> categories = new HashSet<>();
categories.addAll(splitValues(getTextContent(document, "Genre")));
Set<String> categories = splitValues(getTextContent(document, "Genre"));
if (!categories.isEmpty()) {
builder.categories(categories);
}
Set<String> tags = new HashSet<>();
tags.addAll(splitValues(getTextContent(document, "Tags")));
Set<String> tags = splitValues(getTextContent(document, "Tags"));
if (!tags.isEmpty()) {
builder.tags(tags);
}