diff options
author | Paul Arthur <flowerysong00@yahoo.com> | 2013-01-14 16:40:43 -0500 |
---|---|---|
committer | Paul Arthur <flowerysong00@yahoo.com> | 2013-01-15 01:26:38 -0500 |
commit | 7cd9fd9e08370d4fc0ef38420244c1c6b105c672 (patch) | |
tree | 2d35c38e1f86aad96f2efbd8da39d91d368d58c8 /lib/class/localplay.class.php | |
parent | a1594882c732a0883fd54a52158b026d35ab8cdc (diff) | |
download | ampache-7cd9fd9e08370d4fc0ef38420244c1c6b105c672.tar.gz ampache-7cd9fd9e08370d4fc0ef38420244c1c6b105c672.tar.bz2 ampache-7cd9fd9e08370d4fc0ef38420244c1c6b105c672.zip |
localplay: make add_url actually do something
Diffstat (limited to 'lib/class/localplay.class.php')
-rw-r--r-- | lib/class/localplay.class.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index cebc5bff..fb6e65f1 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -42,7 +42,6 @@ class Localplay { public $type; /* Built Variables */ - private $_function_map = array(); private $_template; private $_preferences = array(); private $_player; @@ -117,7 +116,7 @@ class Localplay { if (!$this->type) { return false; } $filename = Config::get('prefix') . '/modules/localplay/' . $this->type . '.controller.php'; - $include = require_once ($filename); + $include = require_once($filename); if (!$include) { /* Throw Error Here */ @@ -287,7 +286,7 @@ class Localplay { public function add($object) { if (!$this->_player->add($object)) { - debug_event('localplay','Error Unable to add songs, check ' . $this->type . ' controller','1'); + debug_event('localplay', 'Failed to add songs, check ' . $this->type . ' controller', 1); return false; } @@ -297,19 +296,15 @@ class Localplay { /** * add_url - * This directly adds an array of URLs to the localplay module. This is really how I should - * have done add, will migrate to this eventually + * This directly adds an URL to the localplay module. Is more betterer. */ - public function add_url($urls) { + public function add_url($url) { - $function = $this->_function_map['add_url']; - - if (!$this->_player->$function($urls)) { - debug_event('localplay','Error Unable to add urls, check ' . $this->type . ' controller','1'); + if (!$this->_player->add_url($url)) { + debug_event('localplay', 'Unable to add url ' . $url . ', check ' . $this->type . ' controller', 1); return false; } - return true; } // add_url |