From dce1535e64ecbcb198b71488a503a69a33534440 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 29 Jul 2012 00:16:09 +0200 Subject: [PATCH] Get audio codec description if audio/codec property is requested. --- .../net/pterodactylus/demoscenemusic/template/PropertiesAccessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/template/PropertiesAccessor.java b/src/main/java/net/pterodactylus/demoscenemusic/template/PropertiesAccessor.java index 4e9bf5b..6294117 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/template/PropertiesAccessor.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/template/PropertiesAccessor.java @@ -19,6 +19,7 @@ package net.pterodactylus.demoscenemusic.template; import net.pterodactylus.demoscenemusic.data.Base; import net.pterodactylus.demoscenemusic.data.Properties; +import net.pterodactylus.demoscenemusic.utils.AudioCodecs; import net.pterodactylus.util.template.Accessor; import net.pterodactylus.util.template.TemplateContext; @@ -41,6 +42,9 @@ public class PropertiesAccessor implements Accessor { @Override public Object get(TemplateContext templateContext, Object object, String member) { Properties properties = (Properties) object; + if ("audio/codec".equals(member)) { + return AudioCodecs.codecDescriptions.get(properties.get(member)); + } return properties.get(member); } -- 2.7.4