From: David ‘Bombe’ Roden Date: Tue, 6 Mar 2012 05:39:04 +0000 (+0100) Subject: Prevent albums from being added multiple times when loading. X-Git-Tag: 0.8.2^2~27 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5b5b953cc8653d3d56093bdcc71d75498a556217;p=Sone.git Prevent albums from being added multiple times when loading. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 296d080..6a6c26a 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -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); + } } }