Kodi Community Forum

Full Version: LisItem.AudioType
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can I have ListItem.AudioType or ListItem.FileExtension so this could be avoided, please:

Code:
<control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>MP3</label>
                <visible>substring(ListItem.Filename,.mp3,right)</visible>
            </control>
            <control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>WMA</label>
                <visible>substring(ListItem.Filename,.wma,right)</visible>
            </control>
            <control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>MPA</label>
                <visible>substring(ListItem.Filename,.mpa,right)</visible>
            </control>
            <control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>AAC</label>
                <visible>substring(ListItem.Filename,.aac,right) | substring(ListItem.Filename,.m4a,right) | substring(ListItem.Filename,.mp4,right)</visible>
            </control>
            <control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>FLAC</label>
                <visible>substring(ListItem.Filename,.flac,right)</visible>
            </control>
            <control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>APE</label>
                <visible>substring(ListItem.Filename,.ape,right)</visible>
            </control>
            <control type="label">
                <include>MusicValuesInfoPanelCommons</include>
                <label>OGG</label>
                <visible>substring(ListItem.Filename,.ogg,right)</visible>
            </control>
ListItem.AudioCodec not work for you?
Hitcher Wrote:ListItem.AudioCodec not work for you?

To be frank did not try it as it says in wiki that's for video.

I wanted to show song type (MP3, AAC, Flac) in a ListInfo view.
Doh of course it, sorry.
I was thinking of MusicPlayer.Codec which is no use for Lists.
We're not yet storing the streamdetails like codec and the likes. Patch welcome :p
vdrfan Wrote:We're not yet storing the streamdetails like codec and the likes. Patch welcome :p

Thanks for the offer. What about file extensions, could those be available?
Yeah, I'll ping jezz and jmarshall before pushing as they are the skin gurus here.
Btw, do you guys want it to return the extension only or the extension with dot (.ext)?
vdrfan Wrote:Btw, do you guys want it to return the extension only or the extension with dot (.ext)?

Yup, that's sufficient for me.
So plain extension only (eg. 'wav') ?
Yes that's better.
vdrfan Wrote:So plain extension only (eg. 'wav') ?

Yes & Thanks.
added: info label 'Listitem.FileExtension' - returns file extension without leading dot (eg. 'wav') in https://github.com/xbmc/xbmc/commit/8689...83481cd917