diff options
author | sigger <sigger@ampache> | 2006-02-02 04:34:15 +0000 |
---|---|---|
committer | sigger <sigger@ampache> | 2006-02-02 04:34:15 +0000 |
commit | 1e7684528e28aea6f30e31fa3f674d61e282df30 (patch) | |
tree | d43678e0104f8a299663779f0c9d23799d885bc3 /modules | |
parent | 27847d72ca91c107a1f74cb1e072e58c9cbe7b8f (diff) | |
download | ampache-1e7684528e28aea6f30e31fa3f674d61e282df30.tar.gz ampache-1e7684528e28aea6f30e31fa3f674d61e282df30.tar.bz2 ampache-1e7684528e28aea6f30e31fa3f674d61e282df30.zip |
mpd mini-control for all pages! final ajax tweak? etc
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mpd/mpd.class.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/mpd/mpd.class.php b/modules/mpd/mpd.class.php index ed324ba3..2556f01b 100644 --- a/modules/mpd/mpd.class.php +++ b/modules/mpd/mpd.class.php @@ -838,11 +838,15 @@ class mpd { // Set Misc Other Variables
$this->state = $status['state'];
- if ( ($this->state == MPD_STATE_PLAYING) || ($this->state == MPD_STATE_PAUSED) ) {
+ if ($status['playlistlength']>0) { $this->current_track_id = $status['song'];
+ } else { + $this->current_track_id = -1; + } + if ( ($this->state == MPD_STATE_PLAYING) || ($this->state == MPD_STATE_PAUSED) ) {
list ($this->current_track_position, $this->current_track_length ) = split(":",$status['time']);
} else {
- $this->current_track_id = -1;
+// $this->current_track_id = -1;
$this->current_track_position = -1;
$this->current_track_length = -1;
}
|