[%- IF streaminfo.item.image; artwork = streaminfo.item.image; ELSIF streaminfo.item.icon; artwork = streaminfo.item.icon; ELSE; IF streaminfo.item.url.search('^(http|mms):'); artwork = webroot _ "html/images/radio.png"; ELSE; artwork = "/music/0/cover.jpg"; END; END; # prepend webroot unless we have an absolute url UNLESS artwork.match("^(\/|http)"); artwork = webroot _ artwork; END; -%]
[% IF songInfoPlayLinks; songInfoPlayLinks; END %] [% item = (streaminfo.item.name || streaminfo.item.title) | html; title = "TITLE"; PROCESS songInfoItem %] [% IF streaminfo.item.url %] [% item = BLOCK %][% streaminfo.item.url | html %][% END %] [% PROCESS songInfoItem title = "URL" %] [% END %] [% IF streaminfo.item.bitrate %] [% item = BLOCK %][% streaminfo.item.bitrate | html %] [% "KBPS" | string %][% END %] [% PROCESS songInfoItem title = "BITRATE" %] [% END %]
[% IF streaminfo.item.subtitle %] [% item = streaminfo.item.subtitle | html; title = "XML_SUBTITLE"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.pubdate %] [% item = streaminfo.item.pubdate | html; title = "XML_DATE"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.description %] [% item = streaminfo.item.description | html; title = "DESCRIPTION"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.summary %] [% item = streaminfo.item.summary | html; title = "XML_SUMMARY"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.link %] [% item = BLOCK %][% streaminfo.item.link | html %][% END %] [% PROCESS songInfoItem title = "XML_LINK" %] [% END %] [% IF streaminfo.item.enclosure %] [% item = BLOCK %] [% streaminfo.item.enclosure.url | html %]
[% FILTER format('%.2f'); streaminfo.item.enclosure.length / 1048576; END %] MB [% END %] [% PROCESS songInfoItem title = "XML_ENCLOSURE" %] [% END %] [% IF streaminfo.item.duration %] [% item = streaminfo.item.duration | html; title = "LENGTH"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.explicit %] [% item = streaminfo.item.explicit | html; title = "XML_EXPLICIT"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.listeners %] [% item = streaminfo.item.listeners | html; title = "NUMBER_OF_LISTENERS"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.current_track %] [% item = streaminfo.item.current_track | html; title = "NOW_PLAYING"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.genre %] [% item = streaminfo.item.genre | html; title = "GENRE"; PROCESS songInfoItem %] [% END %] [% IF streaminfo.item.source %] [% item = streaminfo.item.source | html; title = "SOURCE"; PROCESS songInfoItem %] [% END %]