Fix for #1109: Consider albums with no artists as well. #1142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for #1109
When Vinyl adds a song to the
MemCache, and the artist name list is empty, the album ID was being inserted intoalbumsByAlbumIdAndArtistId, but no artists inside it. Then, empty albums were captured byDiscography.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.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.