diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-09-20 07:39:45 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-09-20 07:39:45 +0000 |
commit | 1dfdf2afab8da95da8c814e3838b3393d88ae53c (patch) | |
tree | f97be5925ed2dbef028d0902861771ea0a3ec473 /lib/class/localplay.class.php | |
parent | 649c44446a2368ac004ffa5778704f7213cf54ad (diff) | |
download | ampache-1dfdf2afab8da95da8c814e3838b3393d88ae53c.tar.gz ampache-1dfdf2afab8da95da8c814e3838b3393d88ae53c.tar.bz2 ampache-1dfdf2afab8da95da8c814e3838b3393d88ae53c.zip |
made localplay technically work, lots of work to still do
Diffstat (limited to 'lib/class/localplay.class.php')
-rw-r--r-- | lib/class/localplay.class.php | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index 2f77cfd9..c5b16fd3 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -224,14 +224,7 @@ class Localplay { */ public function connect() { - $function = $this->_function_map['connect']; - - /* This is very bad, that means they don't even - * have a connection function defined - */ - if (!$function) { return false; } - - if (!$this->_player->$function()) { + if (!$this->_player->connect()) { debug_event('localplay','Error Unable to connect, check ' . $this->type . ' controller','1'); return false; } @@ -247,9 +240,7 @@ class Localplay { */ public function play() { - $function = $this->_function_map['play']; - - if (!$this->_player->$function()) { + if (!$this->_player->play()) { debug_event('localplay','Error Unable to start playback, check ' . $this->type . ' controller','1'); return false; } @@ -278,20 +269,15 @@ class Localplay { /** * add - * This function takes an array of song_ids and then passes the full URL + * This function takes a single object and then passes it to * to the player, this is a required function. */ - public function add($songs) { - - - /* Call the Function Specified in the Function Map */ - $function = $this->_function_map['add']; + public function add($object) { - if (!$this->_player->$function($songs)) { + if (!$this->_player->add($object)) { debug_event('localplay','Error Unable to add songs, check ' . $this->type . ' controller','1'); return false; } - return true; |