[% BLOCK statusInfo %] [% IF pluginRandomNowPlaying != '' %] [%# Reload status and playlist to reflect any new mixes %]

[% "PLUGIN_RANDOM_GENERAL_HELP" | string %] [% PROCESS randomLink type="disable" addOnly="0" %]

[% END %] [% END %] [% IF ajaxRequest; PROCESS statusInfo; ELSE %] [%- pagetitle = 'PLUGIN_RANDOMPLAY' | string; pageicon = icons.PLUGIN_RANDOMPLAY -%] [% pageHeaderScripts = BLOCK %] [% END %] [% extJsScripts = BLOCK %] [% END %] [%- pwd_list = BLOCK -%]/ [% "PLUGIN_RANDOMPLAY" | string %] [% END -%] [%- pageHeaderInfo = BLOCK %] [%- IF pluginRandomNowPlaying != '' %] [% "NOW_PLAYING" | string %][% "COLON" | string %] [% "PLUGIN_RANDOM_" _ pluginRandomNowPlaying | upper | string %] [% END -%] [% END -%] [%- PROCESS pageheader.html %] [%# Following block generates links that submit the form if javascript is enabled. This allows users to make setting changes then click on a new mix without having to press the submit button. %] [% BLOCK href %] [% IF useExtJS %] href="javascript:RandomPlay.mix('[% type %]', '[% addOnly %]');" [% ELSE %] href="[% webroot %]plugins/RandomPlay/mix.html?type=[% type %]&player=[% player | uri %]&addOnly=[% addOnly %]" onclick='document.genreForm.type.value = "[% type %]"; document.genreForm.addOnly.value = [% addOnly %] document.genreForm.submit(); refreshStatus(); return false;' [% END %] [% END %] [% BLOCK randomLink %] [% IF addOnly;link='addlink';ELSE;link='playlink';END %] [% IF type == 'disable' %] [% "PLUGIN_RANDOM_" _ pluginRandomNowPlaying _ "_DISABLE" | string %] [% ELSE %] [% WRAPPER $link noTarget=1 %] [% PROCESS href %] [% END %] [% END %] [% END %] [% IF player == '' %]

[% "NO_PLAYER_FOUND" | string %]

[% ELSE %]

[% "PLUGIN_RANDOM_CHOOSE_BELOW" | string %]

[% odd = 1 %] [%- WRAPPER contentcontainer listid = "inlineList" %] [% FOREACH type IN mixTypes %] [% mixTypeMap.type; title = 'PLUGIN_RANDOM_' _ type _ '_WEB' | string %] [% BLOCK controls %] [% itemobj = { url = "randomplay://${type}" title = title }; PROCESS favoritescontrol isFavorite = favorites.${type} %] [% PROCESS randomLink type="$type" addOnly="0" %] [% PROCESS randomLink type="$type" addOnly="1" %] [% END %] [%- WRAPPER contentitem controls='controls' %] [% title %] [% END %] [% odd = (not odd) %] [% END %] [% END %]
[% PROCESS statusInfo %]

[% "PLUGIN_RANDOM_GENRE_FILTER_WEB" | string %]

[% odd = 1 %] [% USE table pluginRandomGenreListSort, cols=2, pad=0 %] [%- FOREACH genrerow = table.rows %] [%- FOREACH genre = genrerow %] [%- genreid = "genre_" _ pluginRandomGenreList.item("$genre").id %] [%- END %] [% odd = (not odd) %] [%- END %]
[% IF libraries %]

[% "PLUGIN_RANDOM_LIBRARY_FILTER" | string %][% "COLON" | string %]

[% END %]

[% "PLUGIN_RANDOM_BEFORE_NUM_TRACKS" | string %] [% "PLUGIN_RANDOM_AFTER_NUM_TRACKS" | string %] [% "PLUGIN_RANDOM_AFTER_NUM_OLD_TRACKS" | string %]

[% END %] [% PROCESS pagefooter.html %] [% END %]