Set Sone of an album in the album builder, use album builder to add albums.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ImageBrowserPage.java
index 1b00d81..1e881cf 100644 (file)
@@ -69,9 +69,9 @@ public class ImageBrowserPage extends SoneTemplatePage {
                super.processTemplate(request, templateContext);
                String albumId = request.getHttpRequest().getParam("album", null);
                if (albumId != null) {
-                       Album album = webInterface.getCore().getAlbum(albumId, false);
+                       Optional<Album> album = webInterface.getCore().getAlbum(albumId);
                        templateContext.set("albumRequested", true);
-                       templateContext.set("album", album);
+                       templateContext.set("album", album.orNull());
                        templateContext.set("page", request.getHttpRequest().getParam("page"));
                        return;
                }