refactor(metadata): simplify category and tag handling in CbxMetadata Extractor (#967)
This commit is contained in:
+2
-4
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user