summaryrefslogtreecommitdiffstats
path: root/lib/class/localplay.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-09 20:58:04 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-09 20:58:04 +0000
commit17a4516e29e9ce9d2583d8b06431dfcdf5722c11 (patch)
tree4dcf79a137336f12d38476c12b26128d4098eda5 /lib/class/localplay.class.php
parent883adcd52b1f4cb4afe4ff5062d1bb83218840ff (diff)
downloadampache-17a4516e29e9ce9d2583d8b06431dfcdf5722c11.tar.gz
ampache-17a4516e29e9ce9d2583d8b06431dfcdf5722c11.tar.bz2
ampache-17a4516e29e9ce9d2583d8b06431dfcdf5722c11.zip
added the controls to the mpd playlist does not refresh correctly, but does work
Diffstat (limited to 'lib/class/localplay.class.php')
-rw-r--r--lib/class/localplay.class.php28
1 files changed, 7 insertions, 21 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php
index 7b2ffbd6..02276b13 100644
--- a/lib/class/localplay.class.php
+++ b/lib/class/localplay.class.php
@@ -304,9 +304,7 @@ class Localplay {
*/
public function repeat($state) {
- $function = $this->_function_map['repeat'];
-
- $data = $this->_player->$function($state);
+ $data = $this->_player->repeat($state);
if (!$data) {
debug_event('localplay',"Error Unable to set Repeat to $state",'1');
@@ -323,9 +321,7 @@ class Localplay {
*/
public function random($state) {
- $function = $this->_function_map['random'];
-
- $data = $this->_player->$function($state);
+ $data = $this->_player->random($state);
if (!$data) {
debug_event('localplay',"Error Unable to set Random to $state",'1');
@@ -342,9 +338,7 @@ class Localplay {
*/
public function status() {
- $function = $this->_function_map['status'];
-
- $data = $this->_player->$function();
+ $data = $this->_player->status();
if (!count($data)) {
debug_event('localplay','Error Unable to get status, check ' . $this->type . ' controller','1');
@@ -388,9 +382,7 @@ class Localplay {
/* Make sure that it's between 0 and 100 */
if ($value > 100 OR $value < 0) { return false; }
- $function = $this->_function_map['volume_set'];
-
- if (!$this->_player->$function($value)) {
+ if (!$this->_player->volume($value)) {
debug_event('localplay','Error: Unable to set volume, check ' . $this->type . ' controller','1');
return false;
}
@@ -406,9 +398,7 @@ class Localplay {
*/
public function volume_up() {
- $function = $this->_function_map['volume_up'];
-
- if (!$this->_player->$function()) {
+ if (!$this->_player->volume_up()) {
debug_event('localplay','Error: Unable to increase volume, check ' . $this->type . ' controller','1');
return false;
}
@@ -424,9 +414,7 @@ class Localplay {
*/
public function volume_down() {
- $function = $this->_function_map['volume_down'];
-
- if (!$this->_player->$function()) {
+ if (!$this->_player->volume_down()) {
debug_event('localplay','Error: Unable to decrese volume, check ' . $this->type . ' controller','1');
return false;
}
@@ -442,9 +430,7 @@ class Localplay {
*/
public function volume_mute() {
- $function = $this->_function_map['volume_mute'];
-
- if (!$this->_player->$function()){
+ if (!$this->_player->volume(0)){
debug_event('localplay','Error: Unable to mute volume, check ' . $this->type . ' controller','1');
return false;
}