diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-28 05:39:50 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-28 05:39:50 +0000 |
commit | ebdb7573bf4176b81264d2c66dd567fa3c3ee0bd (patch) | |
tree | f16da64cdfec967a34bc71d5902ca59c64d7b9ac /lib/class | |
parent | 6232e0f8d78c2555e64672341c54916cc0e8b3ed (diff) | |
download | ampache-ebdb7573bf4176b81264d2c66dd567fa3c3ee0bd.tar.gz ampache-ebdb7573bf4176b81264d2c66dd567fa3c3ee0bd.tar.bz2 ampache-ebdb7573bf4176b81264d2c66dd567fa3c3ee0bd.zip |
fixed up localplay a little more, to the point of it basicly working... added check for mysql on installer langue page, tweaked some css as well
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/localplay.class.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index 4d027579..488714ea 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -242,6 +242,43 @@ class Localplay { } // add + /** + * repeat + * This turns the repeat feature of a localplay method on or + * off, takes a 0/1 value + */ + function repeat($state) { + + $function = $this->_function_map['repeat']; + + $data = $this->_player->$function($state); + + if (!$data) { + debug_event('localplay',"Error Unable to set Repeat to $state",'1'); + } + + return $data; + + } // repeat + + /** + * random + * This turns on the random feature of a localplay method + * It takes a 0/1 value + */ + function random($state) { + + $function = $this->_function_map['random']; + + $data = $this->_player->$function($state); + + if (!$data) { + debug_event('localplay',"Error Unable to set Random to $state",'1'); + } + + return $data; + + } // random /** * status @@ -485,6 +522,30 @@ class Localplay { } // delete_all + /** + * get_user_state + * This function returns a user friendly version + * of the current player state + */ + function get_user_state($state) { + + switch ($state) { + case 'play': + return _('Now Playing'); + break; + case 'stop': + return _('Stopped'); + break; + case 'pause': + return _('Paused'); + break; + default: + return _('Unknown'); + break; + } // switch on state + + } // get_user_state + } //end localplay class ?> |