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); builder.authors(authors);
} }
Set<String> categories = new HashSet<>(); Set<String> categories = splitValues(getTextContent(document, "Genre"));
categories.addAll(splitValues(getTextContent(document, "Genre")));
if (!categories.isEmpty()) { if (!categories.isEmpty()) {
builder.categories(categories); builder.categories(categories);
} }
Set<String> tags = new HashSet<>(); Set<String> tags = splitValues(getTextContent(document, "Tags"));
tags.addAll(splitValues(getTextContent(document, "Tags")));
if (!tags.isEmpty()) { if (!tags.isEmpty()) {
builder.tags(tags); builder.tags(tags);
} }