$_SESSION['w_queue'] = "sourcecfgman"; $_SESSION['w_queueargs'] = $_POST['sourceconf']; $_SESSION['w_active'] = 1; // set UI notify $_SESSION['notify']['title'] = 'auto.nas modified'; $_SESSION['notify']['msg'] = 'remount shares in progress...'; session_write_close(); } else { session_start(); $_SESSION['notify']['title'] = 'Job Failed'; $_SESSION['notify']['msg'] = 'background worker is busy.'; session_write_close(); } } */ // wait for worker output if $_SESSION['w_active'] = 1 waitWorker(5, 'sources'); $dbh = cfgdb_connect($db); $source = cfgdb_read('cfg_source', $dbh); $dbh = null; // set normal config template $tpl = "sources.html"; // unlock session files playerSession('unlock', $db, '', ''); foreach ($source as $mp) { if (wrk_checkStrSysfile('/proc/mounts', $mp['name'])) { $icon = "<i class='fa fa-check green sx'></i>"; } else { $icon = "<i class='fa fa-remove red sx'></i>"; } $_mounts .= "<p><a href=\"sources.php?p=edit&id=" . $mp['id'] . "\" class='btn btn-large btn-block'> " . $icon . " NAS/" . $mp['name'] . " //" . $mp['address'] . "/" . $mp['remotedir'] . " </a></p>"; }
if (wrk_checkStrSysfile('/proc/asound/card0/pcm0p/info', 'bcm2835')) { $_audioout = "<select id=\"audio-output-interface\" name=\"conf[audio-output-interface]\" class=\"input-large\">\n"; //$_audioout .= "<option value=\"disabled\">disabled</option>"; $_audioout .= "<option value=\"jack\">Analog Jack</option>\n"; $_audioout .= "<option value=\"hdmi\">HDMI</option>\n"; $_audioout .= "</select>\n"; $_audioout .= "<span class=\"help-block\">Select MPD Audio output interface</span>\n"; } else { $_audioout .= "<input class=\"input-large\" class=\"input-large\" type=\"text\" id=\"port\" name=\"\" value=\"USB Audio\" data-trigger=\"change\" disabled>\n"; } ?> <?php $sezione = basename(__FILE__, '.php'); include '_header.php'; ?> <!-- content --!> <?php // wait for worker output if $_SESSION['w_active'] = 1 waitWorker(1); eval("echoTemplate(\"" . getTemplate("templates/{$tpl}") . "\");"); ?> <!-- content --> <?php debug($_POST); ?> <?php include '_footer.php';
$_mpd_select['audio_output_format'] .= "<option value=\"176400:16:2\" " . ($_mpd['audio_output_format'] == '176400:16:2' ? "selected" : "") . ">16 bit / 176.4 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"44100:24:2\" " . ($_mpd['audio_output_format'] == '44100:24:2' ? "selected" : "") . ">24 bit / 44.1 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"48000:24:2\" " . ($_mpd['audio_output_format'] == '48000:24:2' ? "selected" : "") . ">24 bit / 48 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"88200:24:2\" " . ($_mpd['audio_output_format'] == '88200:24:2' ? "selected" : "") . ">24 bit / 88.2 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"96000:24:2\" " . ($_mpd['audio_output_format'] == '96000:24:2' ? "selected" : "") . ">24 bit / 96 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"176400:24:2\" " . ($_mpd['audio_output_format'] == '176400:24:2' ? "selected" : "") . ">24 bit / 176.4 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"192000:24:2\" " . ($_mpd['audio_output_format'] == '192000:24:2' ? "selected" : "") . ">24 bit / 192 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"44100:32:2\" " . ($_mpd['audio_output_format'] == '44100:32:2' ? "selected" : "") . ">32 bit / 44.1 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"96000:32:2\" " . ($_mpd['audio_output_format'] == '96000:32:2' ? "selected" : "") . ">32 bit / 96 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"192000:32:2\" " . ($_mpd['audio_output_format'] == '192000:32:2' ? "selected" : "") . ">32 bit / 192 kHz</option>\n"; $_mpd_select['audio_output_format'] .= "<option value=\"384000:32:2\" " . ($_mpd['audio_output_format'] == '384000:32:2' ? "selected" : "") . ">32 bit / 384 kHz</option>\n"; // Samplerate converter $_mpd_select['samplerate_converter'] .= "<option value=\"soxr medium\" " . ($_mpd['samplerate_converter'] == 'soxr medium' ? "selected" : "") . " >SoX: Medium Quality</option>\n"; $_mpd_select['samplerate_converter'] .= "<option value=\"soxr high\" " . ($_mpd['samplerate_converter'] == 'soxr high' ? "selected" : "") . " >SoX: High Quality</option>\n"; $_mpd_select['samplerate_converter'] .= "<option value=\"soxr very high\" " . ($_mpd['samplerate_converter'] == 'soxr very high' ? "selected" : "") . " >SoX: Very High Quality</option>\n"; // SRC (Secret Rabbit Code) $_mpd_select['samplerate_converter'] .= "<option value=\"Fastest Sinc Interpolator\" " . ($_mpd['samplerate_converter'] == 'Fastest Sinc Interpolator' ? "selected" : "") . " >SRC: Low Quality</option>\n"; $_mpd_select['samplerate_converter'] .= "<option value=\"Medium Sinc Interpolator\" " . ($_mpd['samplerate_converter'] == 'Medium Sinc Interpolator' ? "selected" : "") . " >SRC: Medium Quality</option>\n"; $_mpd_select['samplerate_converter'] .= "<option value=\"Best Sinc Interpolator\" " . ($_mpd['samplerate_converter'] == 'Best Sinc Interpolator' ? "selected" : "") . " >SRC: Best Quality</option>\n"; // TC (Tim Curtis) 2015-04-29: is this code used anymore? if (wrk_checkStrSysfile('/proc/asound/card0/pcm0p/info', 'bcm2835')) { $_audioout = "<select id=\"audio-output-interface\" name=\"conf[audio-output-interface]\" class=\"input-large\">\n"; $_audioout .= "<option value=\"jack\">Analog Jack</option>\n"; $_audioout .= "<option value=\"hdmi\">HDMI</option>\n"; $_audioout .= "</select>\n"; $_audioout .= "<span class=\"help-block\">Select MPD Audio output interface</span>\n"; } else { $_audioout .= "<input class=\"input-large\" class=\"input-large\" type=\"text\" id=\"port\" name=\"\" value=\"USB Audio\" data-trigger=\"change\" disabled>\n"; } waitWorker(); render("mpd-config");