Prevent albums from being added multiple times when loading.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 6 Mar 2012 05:39:04 +0000 (06:39 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 6 Mar 2012 05:39:04 +0000 (06:39 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java

index 296d080..6a6c26a 100644 (file)
@@ -1456,7 +1456,9 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis
                                }
                                parentAlbum.addAlbum(album);
                        } else {
-                               topLevelAlbums.add(album);
+                               if (!topLevelAlbums.contains(album)) {
+                                       topLevelAlbums.add(album);
+                               }
                        }
                }