diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-09 05:24:08 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-09 05:24:08 +0000 |
commit | 79a890b7bf7bd9b31e6879c64d5651cef02975f3 (patch) | |
tree | 1b675839bf9f2de56f6adcb8c2067c354ecaf1ca /modules/localplay/mpd.controller.php | |
parent | 7b1e57d0ccdda52881645f7c16f42ceb5da15881 (diff) | |
download | ampache-79a890b7bf7bd9b31e6879c64d5651cef02975f3.tar.gz ampache-79a890b7bf7bd9b31e6879c64d5651cef02975f3.tar.bz2 ampache-79a890b7bf7bd9b31e6879c64d5651cef02975f3.zip |
updated localplay buttons again as well as mpd controller updates from sigger
Diffstat (limited to 'modules/localplay/mpd.controller.php')
-rw-r--r-- | modules/localplay/mpd.controller.php | 59 |
1 files changed, 53 insertions, 6 deletions
diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index f05447d0..991d778a 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -65,10 +65,16 @@ class AmpacheMpd { $map['status'] = 'get_status'; $map['connect'] = 'connect'; - /* Optional Functions */ + /* Recommended Functions */ $map['next'] = 'next'; $map['prev'] = 'prev'; $map['pause'] = 'pause'; + $map['volume'] = 'volume'; + $map['loop'] = 'loop'; + $map['random'] = 'random'; + + /* Optional Functions */ + $map['move'] = 'move'; return $map; @@ -151,7 +157,6 @@ class AmpacheMpd { function play() { if (is_null($this->_mpd->Play())) { return false; } - return true; } // play @@ -164,7 +169,6 @@ class AmpacheMpd { function stop() { if (is_null($this->_mpd->Stop())) { return false; } - return true; } // stop @@ -177,7 +181,6 @@ class AmpacheMpd { function next() { if (is_null($this->_mpd->Next())) { return false; } - return true; } // next @@ -189,7 +192,6 @@ class AmpacheMpd { function prev() { if (is_null($this->_mpd->Previous())) { return false; } - return true; } // prev @@ -201,11 +203,56 @@ class AmpacheMpd { function pause() { if (is_null($this->_mpd->Pause())) { return false; } - return true; } // pause + + /** + * volume + * This tells MPD to set the volume to the parameter + */ + function volume($volume) { + + if (is_null($this->_mpd->SetVolume($volume))) { return false; } + return true; + + } // volume + + /** + * loop + * This tells MPD to set the repeating the playlist (i.e. loop) to either on or off + */ + function loop($onoff) { + + if (is_null($this->_mpd->SetRepeat($onoff))) { return false; } + return true; + + } // loop + + + /** + * random + * This tells MPD to turn on or off the playing of songs from the playlist in random order + */ + function random($onoff) { + + if (is_null($this->_mpd->SetRandom($onoff))) { return false; } + return true; + + } // random + + /** + * move + * This tells MPD to move song from SrcPos to DestPos + */ + function move($SrcPos, $DestPos) { + + if (is_null($this->_mpd->PLMoveTrack($SrcPos, $DestPos))) { return false; } + + return true; + } // move + /** * get_songs * This functions returns an array containing information about |