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;
}