From c837dd5752ec436333fe246ce88a90ccfe6eae93 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 12 Jul 2005 07:16:40 +0000 Subject: more mpd fixes and xmlrpc fixes and simplified chinese --- lib/general.lib.php | 27 +++++++++++++++++++++++++++ lib/preferences.php | 1 + 2 files changed, 28 insertions(+) (limited to 'lib') diff --git a/lib/general.lib.php b/lib/general.lib.php index 8f895429..73467efc 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -742,4 +742,31 @@ function tbl_name($table) { } // table +/** + * Init MPD - This is originally from /amp-mpd.php + * This initializes MPD if it is the playback method. + * Returns 1 if error, 0 if all good + * @package + * @catagory + */ + +function init_mpd () { + +global $myMpd; + +if (!class_exists('mpd')) { require_once(conf('prefix')."/modules/mpd/mpd.class.php"); } +if (!is_object($myMpd)) { $myMpd = new mpd(conf('mpd_host'),conf('mpd_port')); } +if (!$myMpd->connected) + { + echo "" . _("Error Connecting") . ": " . $myMpd->errStr . "
\n"; + log_event ($_SESSION['userdata']['username'],' connection_failed ',"Error: unable to connect to MPD, ".$myMpd->errStr); + return 1; + } + +return 0; + +} // function init_mpd () + + + ?> diff --git a/lib/preferences.php b/lib/preferences.php index 455612e5..768713c9 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -261,6 +261,7 @@ function create_preference_input($name,$value) { echo "\t\n"; echo "\t\n"; echo "\t\n"; + echo "\t\n"; echo "\n"; break; case 'theme_name': -- cgit