Fix album loading.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 12 Apr 2011 07:04:31 +0000 (09:04 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 04:41:05 +0000 (06:41 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index 5911675..78cd58d 100644 (file)
@@ -1343,8 +1343,9 @@ public class Core implements IdentityListener, UpdateListener, ImageInsertListen
 
                /* load albums. */
                List<Album> topLevelAlbums = new ArrayList<Album>();
+               int albumCounter = 0;
                while (true) {
-                       String albumPrefix = sonePrefix + "/Albums/" + albums.size();
+                       String albumPrefix = sonePrefix + "/Albums/" + albumCounter++;
                        String albumId = configuration.getStringValue(albumPrefix + "/ID").getValue(null);
                        if (albumId == null) {
                                break;