diff --git a/spotizerr-ui/src/routes/history.tsx b/spotizerr-ui/src/routes/history.tsx index 7effd19..70a69a0 100644 --- a/spotizerr-ui/src/routes/history.tsx +++ b/spotizerr-ui/src/routes/history.tsx @@ -166,18 +166,32 @@ export const History = () => { cell: (info) => { const entry = info.row.original; const isChild = "album_title" in entry; - return isChild ? ( + const historyEntry = entry as HistoryEntry; + const spotifyId = historyEntry.external_ids?.spotify; + const downloadType = historyEntry.download_type; + + const titleContent = isChild ? ( └─ {entry.title} ) : (
{entry.title} - {(entry as HistoryEntry).children_table && ( + {historyEntry.children_table && ( - {(entry as HistoryEntry).total_tracks || "?"} tracks + {historyEntry.total_tracks || "?"} tracks )}
); + + if (!isChild && spotifyId && downloadType) { + return ( + + {titleContent} + + ); + } + + return titleContent; }, }), columnHelper.accessor("artists", {