diff --git a/src/components/viewtypes/ListViewTable.tsx b/src/components/viewtypes/ListViewTable.tsx index 1f8ba53..63914dd 100644 --- a/src/components/viewtypes/ListViewTable.tsx +++ b/src/components/viewtypes/ListViewTable.tsx @@ -749,7 +749,7 @@ const ListViewTable = ({ {(rowData.artist || []).map((artist: GenericItem, i: number) => ( <> - {column.dataKey.match(/artist|genre/) ? ( + {column.dataKey === 'genre' ? ( + <> + {rowData.genre ? ( + rowData.genre.map((genre: GenericItem, i: number) => ( + <> + {i > 0 && , } + + + { + if (!e.ctrlKey && !e.shiftKey) { + dispatch( + setActive({ + ...album.active, + filter: rowData[column.dataKey][i]?.title, + }) + ); + setTimeout(() => { + history.push( + `/library/album?sortType=${ + rowData[column.dataKey][i]?.title + }` + ); + }, 50); + } + }} + playing={ + (rowData.uniqueId === playQueue?.currentSongUniqueId && + nowPlaying) || + (!nowPlaying && + rowData.id === playQueue?.currentSongId && + playQueue?.currentSongId) + ? 'true' + : 'false' + } + style={{ + fontSize: `${fontSize}px`, + }} + > + {rowData[column.dataKey][i]?.title} + + + + )) + ) : ( + + )} + + ) : column.dataKey === 'artist' ? ( <> {rowData[column.dataKey] ? ( - + { if (!e.ctrlKey && !e.shiftKey) { - if (column.dataKey === 'artist') { - if (rowData[column.dataKey][0]?.id && !isModal) { - history.push( - `/library/artist/${rowData[column.dataKey][0]?.id}` - ); - } else if (rowData[0]?.id && isModal) { - dispatch( - addModalPage({ - pageType: 'artist', - id: rowData[0]?.id, - }) - ); - } - } else if (column.dataKey === 'genre') { + if (rowData.albumArtistId && !isModal) { + history.push(`/library/artist/${rowData.albumArtistId}`); + } else if (rowData[0]?.id && isModal) { dispatch( - setActive({ - ...album.active, - filter: rowData[column.dataKey][0]?.title, + addModalPage({ + pageType: 'artist', + id: rowData[0]?.id, }) ); - setTimeout(() => { - history.push( - `/library/album?sortType=${ - rowData[column.dataKey][0]?.title - }` - ); - }, 50); } } }} @@ -973,7 +1007,7 @@ const ListViewTable = ({ fontSize: `${fontSize}px`, }} > - {rowData[column.dataKey][0]?.title} + {rowData.albumArtist} ) : (