Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Inconsistent Tag View behaviour.
#21
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.

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
Reply


Messages In This Thread
Inconsistent Tag View behaviour. - by the_bertrum - 06-10-2020, 09:30 AM
RE: Inconsistent Tag View behaviour. - by seashell - 09-14-2020, 12:26 AM

Forum Jump: