From 3550177f6745e54c40cfa8ba61caa7c901d60783 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Thu, 8 Jan 2026 01:30:32 -0800 Subject: [PATCH] ignore external albums in album section playback handler --- .../components/album-artist-detail-content.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 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 dbe3778be..ba324907e 100644 --- a/src/renderer/features/artists/components/album-artist-detail-content.tsx +++ b/src/renderer/features/artists/components/album-artist-detail-content.tsx @@ -1078,13 +1078,18 @@ const AlbumSection = ({ albums, controls, cq, releaseType, rows, title }: AlbumS const displayedAlbums = showAll ? albums : albums.slice(0, MAX_SECTION_CARDS); const hasMoreAlbums = albums.length > MAX_SECTION_CARDS; + const nonExternalAlbums = useMemo( + () => albums.filter((album) => album._serverType !== ServerType.EXTERNAL), + [albums], + ); + const handlePlay = useCallback( (playType: Play) => { - if (albums.length === 0) return; - const albumIds = albums.map((album) => album.id); + if (nonExternalAlbums.length === 0) return; + const albumIds = nonExternalAlbums.map((album) => album.id); player.addToQueueByFetch(serverId, albumIds, LibraryItem.ALBUM, playType); }, - [albums, player, serverId], + [nonExternalAlbums, player, serverId], ); const handlePlayNext = usePlayButtonClick({ @@ -1125,7 +1130,7 @@ const AlbumSection = ({ albums, controls, cq, releaseType, rows, title }: AlbumS
- {albumCount > 0 && ( + {nonExternalAlbums.length > 0 && (