[%- hasArtwork = 0; contentwrapper = 'contentitem'; container = 'contentcontainer'; artwork = artwork ? artwork : 0; FOREACH item = items; IF item.image; hasArtwork = 1; LAST; END; END; IF hasArtwork; IF artwork == 1; container = 'gallerycontainer'; contentwrapper = 'galleryitem'; END; titleRight = BLOCK %]
[% END; END %] [%- extJsScripts = BLOCK -%] [% END %] [% IF query %] [%# Add the search query to each link if available %] [% searchquery = 'query=' _ query _ '&' %] [% END %] [% FILTER null %] [% pwd_list = []; FOREACH crumb IN crumb; crumbItem = BLOCK %] [% crumb.name %] [% END %] [% pwd_list.push(crumbItem) %] [% END %] [% END # filter -%] [% IF NOT ajaxUpdate %][% PROCESS pageheader.html dontscroll = (streaminfo ? 0 : 1) useSpecialExt="-browse" %][% IF !streaminfo %]
[% END %][% END %] [% IF msg %][% WRAPPER contentcontainer %]
[% msg %]
[% END %][% END %] [% IF streaminfo %] [% IF streaminfo.item.enclosure || streaminfo.item.url; songInfoPlayLinks = BLOCK %] [% END; END %] [% PROCESS xmlbrowser_details.html %] [% END %] [%- IF items.size -%] [%- # Maintain correct index values UNLESS path == 'trackinfo.html'; FOREACH item = items; item.index = index _ (start + loop.index); END; END; %]
[% IF hasPagebar %]
[% PROCESS pagebar %]
[% END %]
[%- BLOCK gencontrol -%] [% IF item.favorites == 1 %] [% WRAPPER favaddlink noTarget=1 %] onclick="Browse.XMLBrowser.toggleFavorite(this, '[% (item.index || index _ (start + loop.index)) | replace("'", "%27") | uri %]', '[% pageinfo.startitem %]', '[% sess %]');" [% END %] [% ELSIF item.favorites == 2 %] [% WRAPPER favdellink noTarget=1 %] onclick="Browse.XMLBrowser.toggleFavorite(this, '[% (item.index || index _ (start + loop.index)) | replace("'", "%27") | uri %]', '[% pageinfo.startitem %]', '[% sess %]');" [% END %] [% END %] [% IF item.type == 'audio' || item.type == 'playlist' || item.enclosure || item.play %] [% WRAPPER playlink %]onclick="Browse.XMLBrowser.play[% IF item.type == 'playlist' %]All[% END %]Link('[% searchquery | replace("'", "%27") | uri %]', '[% (item.index || index _ (start + loop.index)) | replace("'", "%27") | uri %]', '[% sess %]');"[% END %] [% WRAPPER addlink %]onclick="Browse.XMLBrowser.add[% IF item.type == 'playlist' %]All[% END %]Link('[% searchquery | replace("'", "%27") | uri %]', '[% (item.index || index _ (start + loop.index)) | replace("'", "%27") | uri %]', '[% sess %]');"[% END %] [% ELSE %] [% PROCESS dummylink %] [% PROCESS dummylink %] [% END %] [%- END %] [%- # treat track information specially IF path == 'trackinfo.html'; itemobj = { id => sess, album => details.album.0, contributorRoles => details.contributors.keys, contributors => details.contributors, genres => details.genre, year => details.year.0.id title => pagetitle url => itemUrl }; songInfoPlayLinks = BLOCK; PROCESS songInfoPlayLinks attributes = "&track.id=" _ sess item = details.mixers.0; END; PROCESS songinfo_header.html albumFirst = 1 plugin_meta = { title => details.title.0.name }; image = undef; END %] [%- WRAPPER $container %] [% IF image %]
coverArt
[% END %] [% IF itemsHaveAudio %] [%- BLOCK allcontrol -%] [% WRAPPER playlink %]onclick="Browse.XMLBrowser.playAllLink('[% searchquery | replace("'", "%27") | uri %]', '[% currentIndex %]', '[% sess %]');"[% END %] [% WRAPPER addlink %]onclick="Browse.XMLBrowser.addAllLink('[% searchquery | replace("'", "%27") | uri %]', '[% currentIndex %]', '[% sess %]');"[% END %] [%- END %] [%- WRAPPER contentitem controls = 'allcontrol' %] [% "ALL_SONGS" | string %] [%- END %] [% END %] [%- FOREACH item = items %] [% lctype = item.web.group | lower; IF details.${ lctype } || details.contributors.${item.web.group}; NEXT; END %] [% IF item.type == 'search' && !item.weblink; WRAPPER contentitem controls = xmlSearchControls; IF artwork == 1; itemobj.id = loop.count; END; item.name || item.title %]
[% END %] [% ELSE %] [%- WRAPPER $contentwrapper controls = 'gencontrol' addClasses = item.type=='text' ? 'defaultCursor' : '' %] [% IF artwork == 1 || path == 'trackinfo.html'; item.size = thumbSize || 100; itemobj.id = loop.count; END %] [% IF item.image && !(artwork > 0) %]
[% END %] [% IF item.web.type == 'htmltemplate' %] [% PROCESS $item.web.value %] [% ELSE %] [% IF item.weblink %] [% ELSIF item.type == 'redirect' %] [% IF item.web.url %] [% ELSE; NEXT %] [% END %] [% ELSIF !item.type.match('^text') %] [% END %] [% (item.web.value || item.name || item.title) | html_line_break %] [% IF item.weblink || !item.type.match('^text') %] [% END %] [% END %] [% IF item.image && !(artwork > 0) %]
[% END %] [%- END %] [%- END %] [%- END %] [%- END %] [%- END %] [%- IF hasPagebar; infoTab = BLOCK -%]
[% "ITEMS" | string %] [% pageinfo.startitem + 1 %] [% "TO" | string %] [% pageinfo.enditem + 1 %] [% "OF" | string %] [% pageinfo.totalitems %]
[%- END; END -%] [% IF NOT ajaxUpdate %][% IF !streaminfo %]
[% END %][% PROCESS pagefooter.html %][% END %]