From 8c34d116d01d475c6b69411f1e9583a631687380 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 30 Sep 2013 21:01:49 +0200 Subject: [PATCH] Add accessor for all top-level albums of a Sone. --- src/main/java/net/pterodactylus/sone/template/SoneAccessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java index ab872d9..92be8e0 100644 --- a/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/SoneAccessor.java @@ -118,6 +118,8 @@ public class SoneAccessor extends ReflectionAccessor { return trust; } else if (member.equals("allImages")) { return from(asList(sone.getRootAlbum())).transformAndConcat(FLATTENER).transformAndConcat(IMAGES); + } else if (member.equals("albums")) { + return sone.getRootAlbum().getAlbums(); } return super.get(templateContext, object, member); } -- 2.7.4