Set album image after parsing all images.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 30 Sep 2011 07:54:49 +0000 (09:54 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 30 Sep 2011 07:54:49 +0000 (09:54 +0200)
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index 4d63130..1caf186 100644 (file)
@@ -456,7 +456,7 @@ public class SoneDownloader extends AbstractService {
                                                return null;
                                        }
                                }
-                               Album album = core.getAlbum(id).setSone(sone).setTitle(title).setDescription(description).setAlbumImage(albumImageId);
+                               Album album = core.getAlbum(id).setSone(sone).setTitle(title).setDescription(description);
                                if (parent != null) {
                                        parent.addAlbum(album);
                                } else {
@@ -489,6 +489,7 @@ public class SoneDownloader extends AbstractService {
                                                album.addImage(image);
                                        }
                                }
+                               album.setAlbumImage(albumImageId);
                        }
                }