[%- IF ajaxRequest -%]

[%- ELSE -%]
[% pagetitle = "SQUEEZEBOX_MUSIC_PLAYER" | string %] [% IF player_name; name = player_name | html; END -%] [% pagetitle = pagetitle _ ' ' _ name %] [% PROCESS standardheader.html %]
[% BLOCK statusLink -%] [% FILTER null %] [% IF link && !linkString %] [% linkName = link %] [% ELSIF linkString && !link %] [% linkName = linkString | string | upper %] [% END %] [% END -%] [% linkName %] [%- END %]
[% IF player_chooser_list %]
[% END %]
[% "MUSIC_PLAYER" | string %]
[% IF isplayer %]
[% "POWER" | string | upper %][% stringCOLON %]
[% PROCESS statusLink p0 = 'power' p1 = 1 linkString = 'ON' divID = mode == 'on' ? 'valueSelected' : 'valueBold' %] | [% PROCESS statusLink p0 = 'power' p1 = 0 linkString = 'OFF' divID = mode == 'off' ? 'valueSelected' : 'valueBold' %]
[% END %] [% IF isplayer %]
[% "VOLUME" | string | upper %][% stringCOLON %]
[%- FOREACH vol = [0,10,20,30,40,50,60,70,80,90,100] -%] [%- PROCESS statusLink p0 = 'mixer' p1 = 'volume' p2 = vol link = loop.count divID = (!loop.first && (volume > loop.prev) && (volume <= vol)) ? 'valueSelected' : 'valueBold' linkString = '' -%] [%- END -%]
[% END %]
[% PROCESS statusLink link = '' p0 = 'playlist' p1 = 'jump' p2 = plusOne linkString = 'SKIP' divID = 'valueBold' %] | [% PROCESS statusLink p0 = 'play' p1 = '' p2 = '' linkString = 'PLAY' divID = modeplay ? 'valueSelected' : 'valueBold' %] | [% PROCESS statusLink p0 = 'pause' linkString = 'PAUSE' divID = modepause ? 'valueSelected' : 'valueBold' %] | [% PROCESS statusLink p0 = 'stop' linkString = 'STOP' divID = modestop ? 'valueSelected' : 'valueBold' %]
[% "REPEAT" | string | upper %][% stringCOLON %]
[% repeatStrings = ['OFF', 'ONE', 'ALL'] %] [% FOREACH repeatStrings %] [% index = loop.index %] [% PROCESS statusLink p0 = 'playlist' p1 = 'repeat' p2 = index linkString = repeatStrings.$index link = '' divID = (repeat == loop.index) ? 'valueSelected' : 'valueBold' %] [% IF index < 2 %]|[% END %] [% END %]
[% "SHUFFLE" | string | upper %][% stringCOLON %]
[% shuffleStrings = ['OFF', 'SONGS', 'ALBUMS'] %] [% FOREACH shuffleStrings %] [% index = loop.index %] [% PROCESS statusLink p0 = 'playlist' p1 = 'shuffle' p2 = index linkString = shuffleStrings.$index link = '' divID = (shuffle == loop.index) ? 'valueSelected' : 'valueBold' %] [% IF index < 2 %]|[% END %] [% END %]
[% IF playercount == 0 || modestop %] [% "STOPPED" | string | upper %] [% ELSIF modeplay || modepause %] [% "NOW_PLAYING" | string | upper %] [% END %]
[% IF player_needs_upgrade %] [% "PLAYER_NEEDS_UPGRADE" | string %] [% ELSE %] [% IF playercount == 0 %] [% "NO_PLAYER_FOUND" | string %] [% ELSE %] [% IF songcount == 0; "NOTHING" | string; END %] [% END %] [% END %] [% songtitle %] [% IF itemobj.album.title.defined && itemobj.album.title != noAlbum && includeAlbum %] [% stringFROM %] [% itemobj.album.title | html %] [% END %] [% IF itemobj.artist && itemobj.artist != noArtist && includeArtist %] [% PROCESS artistsAsHTML.html %] [% END %]
[% IF songcount %]
[% title = 'REMOVE_FROM_PLAYLIST' | string | ucfirst %] [% PROCESS statusLink p0 = 'playlist' p1 = 'delete' p2 = thissongnum linkString = '' link = "" divID = mode == 'off' ? 'valueSelected' : 'valueBold' %]
[% END %]
[% END %]