never return covers for unindexed songs

Invalid song objects have an id == -1, unindexed songs start at -2, so we should also skip them as their album information is bonkers
This commit is contained in:
Adrian Ulrich 2017-02-02 19:04:41 +01:00
parent 3c15eca5e6
commit cc930c3dbb

View File

@ -224,7 +224,7 @@ public class Song implements Comparable<Song> {
* @return The album art or null if no album art could be found
*/
private Bitmap getCoverInternal(Context context, int size) {
if (CoverCache.mCoverLoadMode == 0 || id == -1 || (flags & FLAG_NO_COVER) != 0)
if (CoverCache.mCoverLoadMode == 0 || id <= -1 || (flags & FLAG_NO_COVER) != 0)
return null;
if (sCoverCache == null)