Fix:iTunes returning artist names with & instead of all comma separated #1022

This commit is contained in:
advplyr 2022-10-04 17:41:26 -05:00
parent 23a25d420c
commit 928c6cf5b3

View File

@ -60,11 +60,15 @@ class iTunes {
}
cleanAudiobook(data) {
// artistName can be "Name1, Name2 & Name3" so we refactor this to "Name1, Name2, Name3"
// see: https://github.com/advplyr/audiobookshelf/issues/1022
const author = (data.artistName || '').split(' & ').join(', ')
return {
id: data.collectionId,
artistId: data.artistId,
title: data.collectionName,
author: data.artistName,
author,
description: htmlSanitizer.stripAllTags(data.description || ''),
publishedYear: data.releaseDate ? data.releaseDate.split('-')[0] : null,
genres: data.primaryGenreName ? [data.primaryGenreName] : null,