Prevent albums from being added multiple times when loading.
[Sone.git] / 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);
+                               }
                        }
                }