diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-01-04 05:58:00 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-01-04 05:58:00 +0000 |
commit | 674337dfc715ddf39b3ca7cd307c66052f6f8674 (patch) | |
tree | a6de985bc39d04ae65a7afbce92936298ae961d2 | |
parent | df608880b797ceb6c2683d956dda1bf249b7897f (diff) | |
download | ampache-674337dfc715ddf39b3ca7cd307c66052f6f8674.tar.gz ampache-674337dfc715ddf39b3ca7cd307c66052f6f8674.tar.bz2 ampache-674337dfc715ddf39b3ca7cd307c66052f6f8674.zip |
fixed a few broken httpq functions
-rw-r--r-- | modules/httpq/httpqplayer.class.php | 10 | ||||
-rw-r--r-- | modules/localplay/httpq.controller.php | 14 |
2 files changed, 13 insertions, 11 deletions
diff --git a/modules/httpq/httpqplayer.class.php b/modules/httpq/httpqplayer.class.php index 094626bc..4c8b72d2 100644 --- a/modules/httpq/httpqplayer.class.php +++ b/modules/httpq/httpqplayer.class.php @@ -161,7 +161,7 @@ class HttpQPlayer { * pause
* toggle pause mode on current song
*/
- function pause() {
+ public function pause() {
$args = array();
$results = $this->sendCommand("pause", $args);
@@ -176,10 +176,10 @@ class HttpQPlayer { * stop
* stops the current song amazing!
*/
- function stop() {
+ public function stop() {
$args = array();
- $results = $this->sendCommand('fadeoutandstop', $args);
+ $results = $this->sendCommand('stop', $args);
if ($results == '0') { $results = null; }
@@ -191,7 +191,7 @@ class HttpQPlayer { * repeat
* This toggles the repeat state of HttpQ
*/
- function repeat($value) {
+ public function repeat($value) {
$args = array('enable'=>$value);
$results = $this->sendCommand('repeat',$args);
@@ -206,7 +206,7 @@ class HttpQPlayer { * random
* this toggles the random state of HttpQ
*/
- function random($value) {
+ public function random($value) {
$args = array('enable'=>$value);
$results = $this->sendCommand('shuffle',$args);
diff --git a/modules/localplay/httpq.controller.php b/modules/localplay/httpq.controller.php index e7ac27de..37c7edde 100644 --- a/modules/localplay/httpq.controller.php +++ b/modules/localplay/httpq.controller.php @@ -432,21 +432,21 @@ class AmpacheHttpq extends localplay_controller { } // volume /** - * loop + * repeat * This tells HttpQ to set the repeating the playlist (i.e. loop) to either on or off */ - function loop($state) { + public function repeat($state) { if (is_null($this->_httpq->repeat($state))) { return false; } return true; - } // loop + } // repeat /** * random * This tells HttpQ to turn on or off the playing of songs from the playlist in random order */ - function random($onoff) { + public function random($onoff) { if (is_null($this->_httpq->random($onoff))) { return false; } return true; @@ -463,9 +463,11 @@ class AmpacheHttpq extends localplay_controller { /* Get the Current Playlist */ $list = $this->_httpq->get_tracks(); - - $songs = explode("::",$list); + if (!$list) { return array(); } + + $songs = explode("::",$list); + foreach ($songs as $key=>$entry) { $data = array(); |