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 1c26e6b57..606f5ae11 100644
--- a/src/renderer/features/artists/components/album-artist-detail-content.tsx
+++ b/src/renderer/features/artists/components/album-artist-detail-content.tsx
@@ -717,28 +717,32 @@ const AlbumArtistMetadataFavoriteSongs = ({ routeId }: AlbumArtistMetadataFavori
tableColumnsData={SONG_TABLE_COLUMNS}
/>
-
+ {/* Restrict the height. Rendering all items in the DOM makes for a long delay */}
+
+
+
+
{!searchTerm.trim() && songs.length > 5 && !showAll && (
setShowAll(true)} variant="subtle">
diff --git a/src/renderer/features/shared/utils.ts b/src/renderer/features/shared/utils.ts
index b82558eea..3c56772d6 100644
--- a/src/renderer/features/shared/utils.ts
+++ b/src/renderer/features/shared/utils.ts
@@ -124,23 +124,12 @@ export const createFuseForLibraryItem = (
});
}
- const sampleItem = items[0];
-
- const stringKeys = Object.keys(sampleItem).filter(
- (key) =>
- typeof sampleItem[key as keyof T] === 'string' &&
- !key.startsWith('_') &&
- key !== 'id' &&
- key !== 'albumId' &&
- key !== 'streamUrl' &&
- key !== 'serverId' &&
- key !== 'ownerId',
- ) as string[];
-
+ const stringKeys: string[] = [];
const nestedKeys: Array<{ getFn: (item: T) => string; name: string }> = [];
switch (itemType) {
case LibraryItem.ALBUM: {
+ stringKeys.push('name', 'releaseType');
nestedKeys.push(
{
getFn: (item) => {
@@ -168,6 +157,7 @@ export const createFuseForLibraryItem = (
}
case LibraryItem.ALBUM_ARTIST: {
+ stringKeys.push('name');
nestedKeys.push({
getFn: (item) => {
const aa = item as AlbumArtist;
@@ -181,9 +171,10 @@ export const createFuseForLibraryItem = (
case LibraryItem.ARTIST:
case LibraryItem.GENRE:
case LibraryItem.RADIO_STATION:
+ stringKeys.push('name');
break;
-
case LibraryItem.PLAYLIST: {
+ stringKeys.push('name');
nestedKeys.push({
getFn: (item) => {
const p = item as Playlist;
@@ -196,7 +187,8 @@ export const createFuseForLibraryItem = (
case LibraryItem.PLAYLIST_SONG:
case LibraryItem.QUEUE_SONG:
- case LibraryItem.SONG: {
+ case LibraryItem.SONG:
+ stringKeys.push('album', 'name');
nestedKeys.push(
{
getFn: (item) => {
@@ -214,7 +206,6 @@ export const createFuseForLibraryItem = (
},
);
break;
- }
}
return new Fuse(items, {