summaryrefslogtreecommitdiffstats
path: root/modules/localplay/mpd.controller.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-07-30 16:22:01 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-07-30 16:22:01 +0000
commit0cf99f9a6c1a797017c146d8a7f19da934c153c4 (patch)
tree369f5ec65ded5a13a5fe0346886545ab06ab9b0a /modules/localplay/mpd.controller.php
parentafa1173a19e08606b5f159807bdf93e84896deac (diff)
downloadampache-0cf99f9a6c1a797017c146d8a7f19da934c153c4.tar.gz
ampache-0cf99f9a6c1a797017c146d8a7f19da934c153c4.tar.bz2
ampache-0cf99f9a6c1a797017c146d8a7f19da934c153c4.zip
a few updates/fixes for localplay
Diffstat (limited to 'modules/localplay/mpd.controller.php')
-rw-r--r--modules/localplay/mpd.controller.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php
index 1cd8fec9..cd07e92e 100644
--- a/modules/localplay/mpd.controller.php
+++ b/modules/localplay/mpd.controller.php
@@ -353,7 +353,13 @@ class AmpacheMpd {
$array['repeat'] = $this->_mpd->repeat;
$array['random'] = $this->_mpd->random;
$array['track'] = $track;
- $array['track_title'] = $this->_mpd->playlist[$track]['Title'];
+
+ preg_match("/song=(\d+)\&/",$this->_mpd->playlist[$track]['file'],$matches);
+ $song_id = $matches['1'];
+ $song = new Song($song_id);
+ $array['track_title'] = $song->title;
+ $array['track_artist'] = $song->get_artist_name();
+ $array['track_album'] = $song->get_album_name();
return $array;