From 7db15c7c729df9672a80f59ed89c9aeb1f7ed2c6 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sat, 27 Dec 2025 15:03:38 -0800 Subject: [PATCH] separate EP and Single in artist releasetypes --- .../album-artist-detail-content.tsx | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/renderer/features/artists/components/album-artist-detail-content.tsx b/src/renderer/features/artists/components/album-artist-detail-content.tsx index bca31fe7c..aa2d57550 100644 --- a/src/renderer/features/artists/components/album-artist-detail-content.tsx +++ b/src/renderer/features/artists/components/album-artist-detail-content.tsx @@ -52,7 +52,6 @@ import { Button } from '/@/shared/components/button/button'; import { Grid } from '/@/shared/components/grid/grid'; import { Group } from '/@/shared/components/group/group'; import { Icon } from '/@/shared/components/icon/icon'; -import { Separator } from '/@/shared/components/separator/separator'; import { Spinner } from '/@/shared/components/spinner/spinner'; import { Spoiler } from '/@/shared/components/spoiler/spoiler'; import { Stack } from '/@/shared/components/stack/stack'; @@ -894,7 +893,18 @@ const ArtistAlbums = () => { return acc; } - // Priority 3: Single (includes EP and other non-album types) + // Priority 3: EP + const hasEPType = album.releaseTypes?.some((type) => type.toLowerCase() === 'ep'); + if (hasEPType) { + const epKey = 'ep'; + if (!acc[epKey]) { + acc[epKey] = []; + } + acc[epKey].push(album); + return acc; + } + + // Priority 4: Single (other non-album types) const hasAlbumType = album.releaseTypes?.some( (type) => type.toLowerCase() === 'album', ); @@ -907,7 +917,7 @@ const ArtistAlbums = () => { return acc; } - // Priority 4: Album + // Priority 5: Album const albumKey = 'album'; if (!acc[albumKey]) { acc[albumKey] = []; @@ -922,7 +932,7 @@ const ArtistAlbums = () => { }, [filteredAndSortedAlbums, routeId]); const releaseTypeEntries = useMemo(() => { - const priorityOrder = ['album', 'single', 'compilation', 'appears-on']; + const priorityOrder = ['album', 'ep', 'single', 'compilation', 'appears-on']; const getPriority = (releaseType: string) => { const index = priorityOrder.indexOf(releaseType); return index === -1 ? 999 : index; @@ -947,18 +957,15 @@ const ArtistAlbums = () => { postProcess: 'sentenceCase', }); break; + case 'ep': + displayName = t('releaseType.primary.ep', { + postProcess: 'sentenceCase', + }); + break; case 'single': - displayName = ( - <> - {t('releaseType.primary.single', { - postProcess: 'sentenceCase', - })} - - {t('releaseType.primary.ep', { - postProcess: 'upperCase', - })} - - ); + displayName = t('releaseType.primary.single', { + postProcess: 'sentenceCase', + }); break; default: displayName = releaseType;