[%- hasArtwork = 0; contentwrapper = 'contentitem'; container = 'contentcontainer'; artwork = artwork ? artwork : 0; useAllControl = 1; IF ajaxUpdate && ajaxUpdate >= 1; container = 'dummycontainer'; END; FOREACH item = items; IF item.image && (item.type != 'audio' || playlist_id || !item.url.match("^file")); hasArtwork = 1; LAST; END; END; IF hasArtwork && !(ajaxUpdate && ajaxUpdate >= 1); IF artwork == 1; IF playlist_id; artwork = 0; ELSE; container = 'gallerycontainer'; contentwrapper = 'galleryitem'; END; END; titleRight = BLOCK %]
[% END; ELSIF hasArtwork && ajaxSearch; artwork = 2; END; USE Prefs; USE OnlineServices; titleFormat = Prefs.preferences('server').get('titleFormat').${Prefs.preferences('server').get('titleFormatWeb')}; includeArtist = !titleFormat.match('ARTIST'); includeAlbum = !titleFormat.match('ALBUM'); IF slideshow; slideshowHelpers = 'class="slideImage" onClick="return false;"'; END; useSpecialExt="-browse" %] [%- extJsScripts = BLOCK -%]
[% IF playlist_id && !noEdit %] [% useSpecialExt="" %]
[% ELSE %]
[% END %] [% END %] [% IF query %] [%# Add the search query to each link if available %] [% searchquery = 'query=' _ query _ '&' %] [% END %] [% IF mquery %] [%# Add the search query to each link if available %] [% multiquery = mquery _ '&' %] [% END %] [% FILTER null %] [% pwd_list = []; FOREACH crumb IN crumb; crumbItem = BLOCK %] [% crumb.name | html %] [% END %] [% pwd_list.push(crumbItem) %] [% END %] [% END # filter -%] [% IF NOT ajaxUpdate %][% PROCESS pageheader.html dontscroll = (streaminfo ? 0 : 1) %][% IF !streaminfo %]
[% END %][% END %] [% IF msg %][% WRAPPER contentcontainer %]
[% msg %]
[% END %][% END %] [% IF streaminfo %] [% IF streaminfo.item.enclosure || streaminfo.item.url; songInfoPlayLinks = BLOCK %]
[% WRAPPER playlink %]onclick="Browse.XMLBrowser.playLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% streaminfo.index %]', '[% sess %]');"[% END %] [% IF allLinks; WRAPPER insertlink %]onclick="Browse.XMLBrowser.insertLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% streaminfo.index %]', '[% sess %]');"[% END; END %] [% WRAPPER addlink %]onclick="Browse.XMLBrowser.addLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% streaminfo.index %]', '[% sess %]');"[% END %] [% IF allLinks; WRAPPER removelink %]onclick="Browse.XMLBrowser.removeLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% streaminfo.index %]', '[% sess %]');"[% END; END %]
[% END; END %] [% PROCESS xmlbrowser_details.html %] [% END %] [%- IF items.size -%] [% IF !ajaxSearch %]
[% IF hasPagebar %]
[% PROCESS pagebar %]
[% END %]
[% IF items.size < 2; useAllControl = 0; END %] [% ELSE %] [% IF total %]
[% IF total > items.size; useAllControl = 0; END %] [% END %] [% END %] [%- BLOCK gencontrol -%] [% IF playlist_id %] [% UNLESS useExtJS %] [%- WRAPPER moveuplink noTarget=1 %] [%- PROCESS editcmd cmd='up' %] [% END %] [%- WRAPPER movedownlink noTarget=1 %] [%- PROCESS editcmd cmd='down' %] [% END %] [% END %] [%- WRAPPER editlink noTarget=1 %] [%- PROCESS editcmd cmd='edit' %] [% END %] [%- WRAPPER removelink noTarget=1 %] [%- PROCESS editcmd cmd='delete' %] [% END %] [% END %] [% IF item.favorites == 1 %] [% WRAPPER favaddlink noTarget=1 %] [% IF songinfo.favorites && item.type != 'audio' %] onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% songinfo.favorites_title | html | replace("'", "%27") %]', '[% songinfo.favorites_icon | uri | replace("'", "%27") %]');" [% ELSIF item.simpleAlbumLink && item.favorites_url %] onclick="SqueezeJS.Utils.toggleFavorite(this, '[% item.favorites_url | uri | replace("'", "%27") %]', '[% (item.name _ " " _ stringBY _ " " _ item.artist) | uri | replace("'", "%27") %]');" [% ELSE %] onclick="Browse.XMLBrowser.toggleFavorite(this, '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% pageinfo.startitem %]', '[% sess %]');" [% END %] [% END %] [% ELSIF item.favorites == 2 %] [% WRAPPER favdellink noTarget=1 %] [% IF songinfo.favorites && item.type != 'audio' %] onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% songinfo.favorites_title | html | replace("'", "%27") %]', '[% songinfo.favorites_icon | uri | replace("'", "%27") %]');" [% ELSE %] onclick="Browse.XMLBrowser.toggleFavorite(this, '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% pageinfo.startitem %]', '[% sess %]');" [% END %] [% END %] [% END %] [% IF item.playLink || item.insertLink || item.addLink || item.removeLink %] [% IF item.playLink; WRAPPER playlink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.playLink | replace("'", "%27") %]&player=[% playerURI %]', 1, SqueezeJS.string('connecting_for'));"[% END; END %] [% IF allLinks && item.insertLink; WRAPPER insertlink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.insertLink | replace("'", "%27") %]&player=[% playerURI %]', 1);"[% END; END %] [% IF item.addLink; WRAPPER addlink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.addLink | replace("'", "%27") %]&player=[% playerURI %]', 1);"[% END; END %] [% IF allLinks && item.removeLink; WRAPPER removelink %]onclick="SqueezeJS.Controller.urlRequest('[% webroot %][% item.removeLink | replace("'", "%27") %]&player=[% playerURI %]', 1);"[% END; END %] [% IF item.mixersLink; WRAPPER morelink %]href="[% webroot %][% item.mixersLink %]?player=[% playerURI %]"[% END; END %] [% ELSIF item.type == 'audio' || item.type == 'playlist' || item.enclosure || item.play %] [% WRAPPER playlink %]onclick="Browse.XMLBrowser.play[% IF item.type == 'playlist' %]All[% END %]Link('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% sess %]');"[% END %] [% IF allLinks; WRAPPER insertlink %]onclick="Browse.XMLBrowser.insertLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% sess %]');"[% END; END %] [% WRAPPER addlink %]onclick="Browse.XMLBrowser.add[% IF item.type == 'playlist' %]All[% END %]Link('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% (item.index || index _ (start + loop.index)) | uri | replace("'", "%27") %]', '[% sess %]');"[% END %] [% ELSIF item.mixersLink %] [% WRAPPER morelink %]href="[% webroot %][% item.mixersLink %]?player=[% playerURI %]"[% END %] [% ELSE %] [% PROCESS dummylink %] [% PROCESS dummylink %] [% END %] [% END %] [%- BLOCK allcontrol -%] [% IF songinfo.favorites == 1 %] [% WRAPPER favaddlink noTarget=1 %] onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% songinfo.favorites_title | html | replace("'", "%27") %]', '[% songinfo.favorites_icon | uri | replace("'", "%27") %]');" [% END %] [% ELSIF songinfo.favorites == 2 %] [% WRAPPER favdellink noTarget=1 %] onclick="SqueezeJS.Utils.toggleFavorite(this, '[% songinfo.favorites_url | uri | replace("'", "%27") %]', '[% songinfo.favorites_title | html | replace("'", "%27") %]', [% songinfo.favorites_icon | uri | replace("'", "%27") %]');" [% END %] [% END %] [% WRAPPER playlink %]onclick="Browse.XMLBrowser.playAllLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% currentIndex %]', '[% sess %]');"[% END %] [% IF allLinks; WRAPPER insertlink %]onclick="Browse.XMLBrowser.insertLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% currentIndex %]', '[% sess %]');"[% END; END %] [% WRAPPER addlink %]onclick="Browse.XMLBrowser.addAllLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% currentIndex %]', '[% sess %]');"[% END %] [% IF allLinks; WRAPPER removelink %]onclick="Browse.XMLBrowser.removeLink('[% multiquery %][% searchquery | uri | replace("'", "%27") %]', '[% currentIndex %]', '[% sess %]');"[% END; END %] [% IF songinfo.mixersLink; WRAPPER morelink %] href="[% webroot %][% songinfo.mixersLink %]?player=[% playerURI %]" [% IF browserTarget %]target="[% browserTarget %]"[% END %] [% END; END %] [%- END %] [% BLOCK editcmd %] href="[% webroot %]edit_playlist.html?player=[% playerURI %]&[% cmd %]=1&playlist_id=[% playlist_id %]&itempos=[% item.play_index %]" [% END %] [% BLOCK editform %] [%- IF item.remote %][% END %] [% END %] [% BLOCK iconTmpl; PROCESS itemIcon size=50 class="browseItemDetail"; END %] [% IF hasArtwork && !artwork %] [% iconTmpl = 'iconTmpl' %] [% END %] [% IF playlist_id %]

[% "NAME" | string %] |  |  | [% IF playlistTitle %] [% END %]
[%- IF warning == 'RENAME_WARNING' %] [% "CONFIRM_OVERWRITE" | string %] [%- END %] [%- IF warning == 'DELETE_WARNING' %] [% "CONFIRM_DELETE" | string %] [%- END %]

[% END %] [%- IF songinfo; songInfoPlayLinks = BLOCK %]
[% IF songinfo.playLink || songinfo.insertLink || songinfo.addLink || songinfo.removeLink; PROCESS gencontrol item = songinfo; ELSIF itemsHaveAudio; PROCESS allcontrol; END %]
[% END; PROCESS songinfo_header.html itemobj = songinfo; image = undef; END %] [%- WRAPPER $container %] [% IF image %]
[% END %] [% IF playlist_id && addItem %] [% PROCESS editform %] [% END %] [% IF itemsHaveAudio && !songinfo && useAllControl %] [% useAllIcon = hasArtwork && artwork == 0 %] [%- WRAPPER contentitem controls = 'allcontrol' lineclass = (useAllIcon ? 'browsedbListItem itemWithCover' : 'browsedbListItem' )%] [% IF useAllIcon %]
[% END %] [% "ALL_SONGS" | string %] [% IF useAllIcon %]
[% END %] [%- END %] [% END %] [% needBR = (artwork != 2 && !ajaxSearch) ? '
' : '' %] [%- FOREACH item = items %] [% IF item.ignore; NEXT; END %] [% lctype = item.web.group | lower; IF details.${ lctype } || details.contributors.${item.web.group}; NEXT; END %] [% IF playlist_id && edit && loop.index == itempos %] [% PROCESS editform %] [% ELSIF item.type == 'redirect' && !(item.web.url || item.weblink || item.link); NEXT %] [% ELSIF item.type == 'search' && !item.weblink; WRAPPER contentitem controls = xmlSearchControls; IF artwork == 1; itemobj.id = loop.count; END; item.name || item.title %] [% END %] [% ELSIF item.type == 'textarea' %]
[% title = (item.web.value || item.name || item.title) %] [% title | html_line_break %]
[% ELSE %] [%- WRAPPER $contentwrapper controls = 'gencontrol' addClasses = (item.type=='text' ? 'defaultCursor' : playlist_id ? 'draggableSong' : '') _ (!(hasArtwork && !artwork) && item.icon ? ' smallIcon' : '') anchor = item.anchor %] [% IF artwork == 1; item.size = thumbSize || 100; itemobj.id = loop.count _ (ajaxUpdate ? index : ''); END %] [% IF iconTmpl %] [% PROCESS iconTmpl url=(item.image || item.icon || 'music/0/cover.jpg') %] [% closeDIV = 1 %] [% END %] [% IF item.web.type == 'htmltemplate' %] [% PROCESS $item.web.value %] [% ELSE %] [% IF item.label %] [% IF item.label == "LYRICS" %]
[% END %] [% item.label | string %] [%- stringCOLON %] [% IF item.label == "LYRICS" %]
[% END %] [% END %] [% WRAPPER weblink %] [% title = item.web.value; IF !title.defined || title == ''; title = item.name; END; IF !title.defined || title == ''; title = item.title; END; title = title | html | html_line_break; IF item.parseURLs; title = title FILTER parseURIs; END; IF item.wrap; # Put wrapped text into a single element. Improves display of multiline comments & lyrics. title = " $title "; END; title %] [% IF includeArtist && item.hasMetadata == 'track' && !item.name2 %] [% # add the track artist if it's different from the album artist artist = item.trackartist || item.artist; htmlartist = artist | html; IF ( (item.albumartist && artist != item.albumartist) || artist != item.artist || itemobj.compilation ); "$stringBY $htmlartist"; END; %] [% END %] [% END %] [% IF item.showYear %] [% IF item.remote %] ([% item.year %]) [% ELSE %] [% needBR %]([% item.year %]) [% END %] [% END %] [% IF playlist_id && includeAlbum %] [% needBR || stringFROM %] [% item.album %] [% END %] [% IF item.showArtist || ( (item.hasMetadata == "album" || item.hasMetadata == "work") && item.name2 ) || (playlist_id && item.name2 && includeArtist) %] [% IF item.artist_id %] [% needBR || stringBY %] [% FOREACH artist IN item.artists %] [% item.artist_id = item.artist_ids.${loop.index} %] [% artist | html %][% UNLESS loop.last; ", "; END %] [% END %] [% ELSIF item.hasMetadata == "work" %] [% needBR || ", " %] [% item.name2 || html %] [% ELSE %] [% needBR || stringBY %] [% (item.artist || item.name2) || html %] [% END %] [% END %] [% END %] [% IF closeDIV %]
[% END %] [%- END %] [%- END %] [%- END %] [%- END %] [%- END %] [%- IF hasPagebar || pageinfo.totalitems; 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 %] [% BLOCK itemIcon %] [% WRAPPER weblink %] [% IF item.extid; serviceIcon = OnlineServices.getIconForId(item.extid); IF serviceIcon %][% END; END %] [% END %]
[% END %] [% BLOCK weblink %] [% IF item.simpleAlbumLink %] [% ELSIF item.weblink %] [% ELSIF item.link %] [% ELSIF item.type == 'redirect' %] [% IF item.web.url %] [% ELSE; NEXT %] [% END %] [% ELSIF !item.type.match('^text') %] [% ELSIF item.type == "text" && item.image %] [% END %] [% IF item.label == "LYRICS" %]

[% END %] [% content %] [% IF item.label == "LYRICS" %]

[% END %] [% IF item.type == 'playlist' || item.weblink || item.link || !item.type.match('^text') %] [% ELSIF item.type == "text" && item.image; details = []; IF item.owner; details.push(item.owner); END; IF item.date; details.push(item.date); END; IF details.size && !content.match("img src"); "(" _ details.join(' - ') _ ")"; END; %] [% END %] [% END %]