Parse NFO comma separated strings remove empty strings

This commit is contained in:
advplyr 2023-11-26 14:38:25 -06:00
parent d9584174ff
commit b4c14fc78d

View File

@ -32,20 +32,20 @@ function parseNfoMetadata(nfoText) {
} }
break break
case 'author': case 'author':
metadata.authors = value.split(/\s*,\s*/) metadata.authors = value.split(/\s*,\s*/).filter(v => v)
break break
case 'narrator': case 'narrator':
case 'read by': case 'read by':
metadata.narrators = value.split(/\s*,\s*/) metadata.narrators = value.split(/\s*,\s*/).filter(v => v)
break break
case 'series name': case 'series name':
metadata.series = value metadata.series = value
break break
case 'genre': case 'genre':
metadata.genres = value.split(/\s*,\s*/) metadata.genres = value.split(/\s*,\s*/).filter(v => v)
break break
case 'tags': case 'tags':
metadata.tags = value.split(/\s*,\s*/) metadata.tags = value.split(/\s*,\s*/).filter(v => v)
break break
case 'copyright': case 'copyright':
case 'audible.com release': case 'audible.com release':