aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-29 16:46:30 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-29 16:46:30 -0800
commit0f37d614b07f9bd9ced404330c52e290104b649c (patch)
tree9bb964bdcaff88362cf18cfbcc7d9992a42697cc /src
parent6b1122baf45eef03cd35c8abbfd1fed73cc8b2ac (diff)
downloaddsub-0f37d614b07f9bd9ced404330c52e290104b649c.tar.gz
dsub-0f37d614b07f9bd9ced404330c52e290104b649c.tar.bz2
dsub-0f37d614b07f9bd9ced404330c52e290104b649c.zip
Keep one instance of each unknown color, not each entry
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/ImageLoader.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/util/ImageLoader.java b/src/github/daneren2005/dsub/util/ImageLoader.java
index e8201a33..2df8802d 100644
--- a/src/github/daneren2005/dsub/util/ImageLoader.java
+++ b/src/github/daneren2005/dsub/util/ImageLoader.java
@@ -124,8 +124,6 @@ public class ImageLoader {
return getUnknownImage(key, size, color, null, null);
} else {
- key = getKey(entry.getId() + "unknown", size);
-
String hash;
if(entry.getAlbum() != null) {
hash = entry.getAlbum();
@@ -136,6 +134,7 @@ public class ImageLoader {
}
color = COLORS[Math.abs(hash.hashCode()) % COLORS.length];
+ key = getKey(color + "unknown", size);
return getUnknownImage(key, size, color, entry.getAlbum(), entry.getArtist());
}
}