diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-30 14:43:11 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-30 14:43:11 +0000 |
commit | 224f007c59eab093bea69eb227faa64104ed4e15 (patch) | |
tree | 44486b935f6d1defaa67e56379a15aab5ec57af9 /lib | |
parent | 10f8a1ec3378c3540a35f73e986cc284f2e66f1d (diff) | |
download | ampache-224f007c59eab093bea69eb227faa64104ed4e15.tar.gz ampache-224f007c59eab093bea69eb227faa64104ed4e15.tar.bz2 ampache-224f007c59eab093bea69eb227faa64104ed4e15.zip |
new mpd interface
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/update.class.php | 18 | ||||
-rw-r--r-- | lib/mpd.php | 6 |
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php index b006b8e7..6af17486 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -924,6 +924,24 @@ class Update { $sql = "ALTER TABLE `object_count` CHANGE `object_type` `object_type` ENUM( 'album', 'artist', 'song', 'playlist', 'genre', 'catalog' ) NOT NULL DEFAULT 'song'"; $sql = "ALTER TABLE `session` CHANGE `type` `type` ENUM( 'sso', 'mysql', 'ldap', 'http' ) NOT NULL DEFAULT 'mysql'"; + + /* Add new preference */ + $sql = "INSERT INTO `preferences` (`id`,`name`,`value`,`description`,`level`,`type`,`locked`) " . + "VALUES ('','condPL','1','Condense Localplay Playlist','0','user','0')"; + + $db_results = mysql_query($sql, dbh()); + + /* Fix existing preferecnes */ + $sql = "SELECT DISTINCT(user) FROM user_preference"; + $db_results = mysql_query($sql, dbh()); + + $user = new User(0); + + while ($results = mysql_fetch_array($db_results)) { + $user->fix_preferences($results[0]); + } + + $this->set_version('db_version','332001'); } // update_332001 diff --git a/lib/mpd.php b/lib/mpd.php index 166bfe5b..376bbedc 100644 --- a/lib/mpd.php +++ b/lib/mpd.php @@ -67,9 +67,13 @@ function addToPlaylist( $myMpd, $song_ids=array()) { function show_mpd_control() { $_REQUEST['action'] = 'show_control'; - require_once ('amp-mpd.php'); + require ('amp-mpd.php'); } // show_mpd_control +function show_mpd_pl() { + require (conf('prefix').'/templates/show_mpdpl.inc'); +} // show_mpd_pl + ?> |