Only set an album image ID if it is null.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Album.java
index 2bbbb57..56bddb2 100644 (file)
@@ -180,7 +180,7 @@ public class Album implements Fingerprintable {
                        image.getAlbum().removeImage(image);
                }
                image.setAlbum(this);
-               if (imageIds.isEmpty()) {
+               if (imageIds.isEmpty() && (albumImage == null)) {
                        albumImage = image.getId();
                }
                if (!imageIds.contains(image.getId())) {