From 561637105a339b696676a04e982df5a9b0eed410 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 29 May 2013 21:35:26 +0200 Subject: [PATCH] Return the correct metadata. --- .../net/pterodactylus/sonitus/data/filter/PredicateFilter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java b/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java index 4000a5b..b400dc7 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java +++ b/src/main/java/net/pterodactylus/sonitus/data/filter/PredicateFilter.java @@ -83,6 +83,14 @@ public class PredicateFilter extends DummyFilter { } @Override + public Metadata metadata() { + if (metadataMatches.get()) { + return filter.metadata(); + } + return super.metadata(); + } + + @Override public void metadataUpdated(Metadata metadata) { metadataMatches.set(metadataPredicate.apply(metadata)); if (metadataMatches.get()) { -- 2.7.4