diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/general.lib.php | 27 | ||||
-rw-r--r-- | lib/preferences.php | 1 |
2 files changed, 28 insertions, 0 deletions
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 "<font class=\"error\">" . _("Error Connecting") . ": " . $myMpd->errStr . "</font><br />\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<option value=\"tr_TR\" $tr_TR_lang>" . _("Turkish") . "</option>\n"; echo "\t<option value=\"es_ES\" $es_ES_lang>" . _("Spanish") . "</option>\n"; echo "\t<option value=\"nl_NL\" $nl_NL_lang>" . _("Norwegian") . "</option>\n"; + echo "\t<option value=\"zh_CN\" $zh_CN_lang>" . _("Simplified Chinese") . "</option>\n"; echo "</select>\n"; break; case 'theme_name': |