Skip to content

Conversation

@lhardt
Copy link

@lhardt lhardt commented Oct 22, 2024

Fix for #1109

When Vinyl adds a song to the MemCache, and the artist name list is empty, the album ID was being inserted into albumsByAlbumIdAndArtistId, but no artists inside it. Then, empty albums were captured by Discography.getAllAlbums, and they all used the same ID (Album.safeGetFirstSong().albumId == -1).

The lines below, paired with the absence of any Artists on the song is what ultimately caused the "Unknown Album" issue.

if (albumsByArtist == null) {
    albumsByArtist = new HashMap<>();
    albumsByAlbumIdAndArtistId.put(song.albumId, albumsByArtist);
}

The unit test implemented corroborates this PR, and it would not pass with the current version of Vinyl.

So the error was not that the albums were invalid (and thus should have been delivered), but that these were real albums that should have been displayed.

@ket395
Copy link

ket395 commented Apr 19, 2025

I read this. Moving on, don't merge this until I make send my first patch. Please, I'm begging you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants