diff options
-rw-r--r-- | lib/class/localplay.class.php | 2 | ||||
-rw-r--r-- | modules/localplay/mpd.controller.php | 4 | ||||
-rw-r--r-- | templates/show_localplay_switch.inc.php | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index 5f616114..3fe95f78 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -116,7 +116,7 @@ class Localplay { $name = scrub_out($name); if ($this->has_function('skip')) { - $url = conf('web_path') . '/server/ajax.server.php?action=localplay&cmd=skip&value=' . $id; + $url = conf('web_path') . '/server/ajax.server.php?action=localplay&cmd=skip&value=' . $id . '&user_id=' . $GLOBALS['user']->id . '&sessid=' . session_id(); $name = "<span style=\"cursor:pointer;text-decoration:underline;\" onclick=\"ajaxRequest('$url');\">$name</span>"; } diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index 189e9b74..1cd8fec9 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -345,11 +345,15 @@ class AmpacheMpd { */ function get_status() { + $track = $this->_mpd->current_track_id; + /* Construct the Array */ $array['state'] = $this->_mpd->state; $array['volume'] = $this->_mpd->volume; $array['repeat'] = $this->_mpd->repeat; $array['random'] = $this->_mpd->random; + $array['track'] = $track; + $array['track_title'] = $this->_mpd->playlist[$track]['Title']; return $array; diff --git a/templates/show_localplay_switch.inc.php b/templates/show_localplay_switch.inc.php index 18129ba1..32e535f9 100644 --- a/templates/show_localplay_switch.inc.php +++ b/templates/show_localplay_switch.inc.php @@ -1,6 +1,6 @@ -<span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=stream<?php echo $required_info; ?>','play_type');return true;"> +<span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type&type=stream<?php echo $required_info; ?>','play_type');return true;"> <?php echo _('Stream') ?> </span><br /><br /> -<span <?php echo $localplay; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=localplay<?php echo $required_info; ?>','play_type');return true;"> +<span <?php echo $localplay; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type&type=localplay<?php echo $required_info; ?>','play_type');return true;"> <?php echo _('Localplay'); ?> </span> |