Hey guys mine is so hacked up now it won't work with the default release of XBMC. I can do it if needed.
Here is the basics though. It's as simple as specifying the codec and corresponding channels.
So right now in we have this below, basically saying display a dolby digital flag for whatever version of ac3 the encode has.
Code:
<control type="image">
<description>ac3 Image</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/ac3.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) + !substring(ListItem.AudioChannels,6)</visible>
</control>
<control type="image">
<description>Dolby Digital Image</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/dolbydigital.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) + substring(ListItem.AudioChannels,6)</visible>
</control>
So instead of that we just specify which image to display according to the number of channels.
Code:
<control type="image">
<description>ac3 2.0</description>
<width>70</width>
<height>55</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/ac320.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) [b]+ substring(ListItem.AudioChannels,2)[/b]</visible>
</control>
<control type="image">
<description>ac3 5.1</description>
<width>70</width>
<height>55</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/ac351.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) [b]+ substring(ListItem.AudioChannels,6)[/b]</visible>
</control>
I'm not good at explaining but that visual should hopefully make sense.
Here is my complete audio portion I have thus far. Hits all movies I have but could be missing something.
Code:
<control type="image">
<description>mp3 Codec Image</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/mp3.png</texture>
<visible>substring(ListItem.AudioCodec,mp3)</visible>
</control>
<control type="image">
<description>dts 5.1</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/dts51.png</texture>
<visible>substring(ListItem.AudioCodec,dca) + substring(ListItem.AudioChannels,6)</visible>
</control>
<control type="image">
<description>ac3 1.0</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/ac310.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) + substring(ListItem.AudioChannels,1)</visible>
</control>
<control type="image">
<description>ac3 2.0</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/ac320.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) + substring(ListItem.AudioChannels,2)</visible>
</control>
<control type="image">
<description>ac3 5.1</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/ac351.png</texture>
<visible>substring(ListItem.AudioCodec,ac3) + substring(ListItem.AudioChannels,6) | substring(ListItem.AudioChannels,5)</visible>
</control>
<control type="image">
<description>aac Image</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/aac.png</texture>
<visible>substring(ListItem.AudioCodec,aac)</visible>
</control>
<control type="image">
<description>WMA</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/wmapro.png</texture>
<visible>substring(ListItem.AudioCodec,wmapro) | substring(ListItem.AudioCodec,wma)</visible>
</control>
<control type="image">
<description>vorbis Image</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/vorbis.png</texture>
<visible>substring(ListItem.AudioCodec,vorbis)</visible>
</control>
<control type="image">
<description>dtsma 5.1</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/dtsma51.png</texture>
<visible>substring(ListItem.AudioCodec,dtsma) + substring(ListItem.AudioChannels,6)</visible>
</control>
<control type="image">
<description>truehd 5.1</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/truehd51.png</texture>
<visible>substring(ListItem.AudioCodec,truehd) + substring(ListItem.AudioChannels,6)</visible>
</control>
<control type="image">
<description>flac</description>
<width>60</width>
<height>40</height>
<aspectratio>keep</aspectratio>
<texture>flagging/audio/flac.png</texture>
<visible>substring(ListItem.AudioCodec,flac)</visible>
</control>