Update server/utils/parsers/parseOpfMetadata.js

This commit is contained in:
advplyr 2023-07-15 11:41:44 -05:00 committed by GitHub
parent a87c3f2c77
commit d181e66d83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,7 @@ function fetchNarrators(creators, metadata) {
function fetchTags(metadata) {
if (!metadata['dc:tag'] || !metadata['dc:tag'].length) return []
return metadata['dc:tag'].filter(tag => (typeof tag === 'string')).filter((item, index) => metadata['dc:tag'].indexOf(item) === index)
return [...new Set(metadata['dc:tag'].filter(tag => typeof tag === 'string'))]
}
function stripPrefix(str) {