Don’t store image explicitely after adding it to an album.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 12 Oct 2013 15:31:25 +0000 (17:31 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:24 +0000 (22:25 +0100)
The album builder takes care of that.

src/main/java/net/pterodactylus/sone/core/Core.java

index 2628127..8756c60 100644 (file)
@@ -1518,7 +1518,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                checkArgument(sone.isLocal(), "sone must be a local Sone");
                checkArgument(sone.equals(album.getSone()), "album must belong to the given Sone");
                Image image = album.newImageBuilder().withId(temporaryImage.getId()).createdNow().sized(temporaryImage.getWidth(), temporaryImage.getHeight()).build();
-               database.storeImage(image);
                imageInserter.insertImage(temporaryImage, image);
                return image;
        }