From 1dfdf2afab8da95da8c814e3838b3393d88ae53c Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 20 Sep 2007 07:39:45 +0000 Subject: made localplay technically work, lots of work to still do --- lib/class/localplay.class.php | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'lib/class/localplay.class.php') 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; -- cgit