From ca34aa1edeb011baed4e2a6fabe56d90c0ba314d Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 5 Dec 2006 04:43:13 +0000 Subject: * Prevent Album art set on demo because people put porn in there :( * Fix Push functionality for the Democratic view stuff * Add footer div definition per Apex's request * Fix Config display with multi-value elements * Added plugin checking to update.php wq --- modules/localplay/mpd.controller.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules') diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index 1d850b48..b782b17c 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -77,6 +77,7 @@ class AmpacheMpd { /* Optional Functions */ $map['move'] = 'move'; $map['delete_all'] = 'clear_playlist'; + $map['add_url'] = 'add_url'; return $map; @@ -127,6 +128,22 @@ class AmpacheMpd { } // add_songs + /** + * add_url + * This adds urls directly to the playlist, recieves an array of urls + */ + function add_url($urls) { + + foreach ($urls as $url) { + if (is_null($this->_mpd->PlAdd($url))) { + debug_event('mpd_add','Error: Unable to add $url to MPD ' . $this->_mpd->errStr,'1'); + } + + } // end foreach + + return true; + + } // add_url /** * delete_songs -- cgit