Better handling of album comments (#1013)
* Change album comment behaviour * Don't check first item * Fix previously imported album comments. * Remove song comments if album comment is present
This commit is contained in:
@@ -157,7 +157,17 @@ const AlbumSongs = (props) => {
|
||||
)
|
||||
}
|
||||
|
||||
export const removeAlbumCommentsFromSongs = ({ album, data }) => {
|
||||
if (album?.comment && data) {
|
||||
Object.values(data).forEach((song) => {
|
||||
song.comment = ''
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const SanitizedAlbumSongs = (props) => {
|
||||
removeAlbumCommentsFromSongs(props)
|
||||
|
||||
const { loaded, loading, total, ...rest } = useListContext(props)
|
||||
return <>{loaded && <AlbumSongs {...rest} actions={props.actions} />}</>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user