From: David ‘Bombe’ Roden Date: Sat, 28 Jul 2012 22:16:09 +0000 (+0200) Subject: Get audio codec description if audio/codec property is requested. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=dce1535e64ecbcb198b71488a503a69a33534440;p=demoscenemusic.git Get audio codec description if audio/codec property is requested. --- 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); }