Only add album to Sone if it has no parent album.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Mar 2011 19:44:06 +0000 (20:44 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Mar 2011 19:44:06 +0000 (20:44 +0100)
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;
        }