Only add album to Sone if it has no parent album.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 585d71f..9c2cedc 100644 (file)
@@ -1710,8 +1710,9 @@ public class Core implements IdentityListener, UpdateListener {
                album.setSone(sone);
                if (parent != null) {
                        parent.addAlbum(album);
+               } else {
+                       sone.addAlbum(album);
                }
-               sone.addAlbum(album);
                return album;
        }