3 Pitchfork Music Player Daemon Client
4 Copyright (C) 2007 Roger Bystrøm
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; version 2 of the License.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 require_once("../inc/base.php");
21 header("Content-Type: text/javascript");
22 $delay = get_config("update_delay");
23 $disable_amazon = get_config("amazon_link_disable");
24 $metadata_disable = get_config("metadata_disable");
26 if(is_null($delay)||!is_numeric($delay)) {
30 echo "var update_delay = " . $delay . ";\n";
32 if(is_null($metadata_disable)) {
33 $metadata_disable = "false";
35 else $metadata_disable = "true";
36 echo "var metadata_disable = " . $metadata_disable . ";\n";
38 echo "var stop_button = ";
39 if(is_null(get_config("stop_button"))) {
48 echo "var pl_entries = new Array('Pos', ";
50 $selected = get_selected_plfields();
51 $length = count($pl_fields);
52 for($i=0; $i<$length; $i++) {
54 echo "'" . $pl_fields[$i] . "', ";
59 echo "var SHOUT_URL=";
60 $shout = get_config("shout_url");
62 echo "\"" . str_replace("\"", "\\\"", $shout) . "\"";
66 echo "var pagination_max = " . get_config("pagination", "0") . ";\n";