Hacking the album search at the end of filterLib was clearly a horrible place to do it. When I click an album after clicking an artist things break. So I just changed the filterAlbums call to do a search by artist by using the songs then going back to the albums so it can find artists other than the album artist. Here's all the changes I made in a diff.
I still don't claim this is the most efficient way to do the song -> album via artist (not Album_Artist) search, nor to keep the full artist list sorted.
I also verified that album art issues in genre happen even without any of these mods.
I'll stop and leave you in peace now.
I still don't claim this is the most efficient way to do the song -> album via artist (not Album_Artist) search, nor to keep the full artist list sorted.
I also verified that album art issues in genre happen even without any of these mods.
Code:
diff scripts-library.js.orig scripts-library.js
101c101
< var artist = (track.album_artist || track.artist).toLowerCase();
---
> var artist = (track.artist || track.album_artist).toLowerCase();
104c104
< acc[artist].artist = track.album_artist || track.artist;
---
> acc[artist].artist = track.artist || track.album_artist;
349a350
> filteredArtists.sort();
363,364c364,367
< filteredAlbums = filteredAlbums.filter(filterByArtist);
< filteredAlbumCovers = filteredAlbumCovers.filter(filterByArtist);
---
> artistSongs = allSongs.filter(filterByArtist);
> songKeys = artistSongs.map(a => a.key)
> filteredAlbums = filteredAlbums.filter(function(item){return songKeys.includes(keyAlbum(item));});
> filteredAlbumCovers = filteredAlbumCovers.filter(function(item){return songKeys.includes(keyAlbum(item));});
1226d1228
<
I'll stop and leave you in peace now.
![Smile Smile](https://moodeaudio.org/forum/images/smilies/smile.png)