Update server/utils/parsers/parseOpfMetadata.js

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

View File

@ -92,7 +92,7 @@ function fetchDescription(metadata) {
function fetchGenres(metadata) {
if (!metadata['dc:subject'] || !metadata['dc:subject'].length) return []
return metadata['dc:subject'].map(g => typeof g === 'string' ? g : null).filter(g => !!g).filter((item, index) => metadata['dc:subject'].indexOf(item) === index)
return [...new Set(metadata['dc:subject'].filter(g => typeof g === 'string'))]
}
function fetchLanguage(metadata) {