mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
Fix:iTunes returning artist names with & instead of all comma separated #1022
This commit is contained in:
parent
23a25d420c
commit
928c6cf5b3
@ -60,11 +60,15 @@ class iTunes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanAudiobook(data) {
|
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 {
|
return {
|
||||||
id: data.collectionId,
|
id: data.collectionId,
|
||||||
artistId: data.artistId,
|
artistId: data.artistId,
|
||||||
title: data.collectionName,
|
title: data.collectionName,
|
||||||
author: data.artistName,
|
author,
|
||||||
description: htmlSanitizer.stripAllTags(data.description || ''),
|
description: htmlSanitizer.stripAllTags(data.description || ''),
|
||||||
publishedYear: data.releaseDate ? data.releaseDate.split('-')[0] : null,
|
publishedYear: data.releaseDate ? data.releaseDate.split('-')[0] : null,
|
||||||
genres: data.primaryGenreName ? [data.primaryGenreName] : null,
|
genres: data.primaryGenreName ? [data.primaryGenreName] : null,
|
||||||
|
Loading…
Reference in New Issue
Block a user