[% IF image || plugin_meta.cover || plugin_meta.icon %] [%# Display plugin cover or icon %] [% IF image || plugin_meta.cover %] [%- IF image; parts = image.match('(/music/.*/cover)\.jpg'); IF parts.0; image = parts.0 _ '_150x150_o'; END; END; -%] [% ELSIF plugin_meta.icon %] [% END %] [% ELSE %] [%# fall back to 0 for cover link if itemobj.id isn't going to give us a valid id %] [% END %]
[% IF songInfoPlayLinks; songInfoPlayLinks; END %] [%- albumInfo = BLOCK%] [% IF itemobj.album %] [% item = BLOCK %][% itemobj.album.title || itemobj.album.name | html %][% END %] [% PROCESS songInfoItem title = "ALBUM" %] [% END %] [% END %] [% IF albumFirst; albumInfo; END %] [% IF plugin_meta.title %] [% item = BLOCK %][% plugin_meta.title | html %][% END %] [% PROCESS songInfoItem title = "TITLE" %] [% END %] [% FOREACH role = itemobj.contributorRoles.sort %] [% contributors = itemobj.contributors.${role} || itemobj.contributorsOfType(role) || itemobj.album.artistsForRoles(role) %] [% IF contributors %] [% contributorsHTML = [] %] [% FOREACH contributor = contributors %] [% UNLESS notarget; target = "target=\"browser\""; END %] [% IF contributor.id; contributorHTMLFrag = "$contributor.name"; ELSE; contributorHTMLFrag = contributor.name; END %] [% contributorsHTML.push(contributorHTMLFrag) %] [% END %] [% item = contributorsHTML.join(', ') %] [% title = role | upper; PROCESS songInfoItem %] [% END %] [% END %] [% IF plugin_meta.artist %] [% item = BLOCK %][% plugin_meta.artist | html %][% END %] [% PROCESS songInfoItem title = "ARTIST" %] [% END %] [% IF !albumFirst; albumInfo; END %] [% IF itemobj.genres %] [% genresHTML = [] %] [% FOREACH genre = itemobj.genres %][% UNLESS notarget; target = "target=\"browser\""; END %] [% genreHTMLFrag = "$genre.name" %] [% genresHTML.push(genreHTMLFrag) %] [% END %] [% item = genresHTML.join(', ') %] [% PROCESS songInfoItem title = "GENRE" %] [% END %] [% IF itemobj.year %] [% item = BLOCK %][% itemobj.year| html %][% END %] [% PROCESS songInfoItem title = "YEAR" %] [% END %] [% IF albumDuration %] [% item = albumDuration; title = "LENGTH"; PROCESS songInfoItem %] [% END %] [% IF itemobj.album.compilation %] [% item = "YES" | string; title = "COMPILATION"; PROCESS songInfoItem %] [% END %] [% IF itemobj.album.replay_gain.defined %] [% item = itemobj.album.replay_gain | format('%2.2f') |html; title = "ALBUMREPLAYGAIN"; PROCESS songInfoItem %] [% END %]