diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-06 03:11:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-06-06 03:11:40 +0000 |
commit | 88cac15dd7d3af9fb87d1a430c079205b91801a0 (patch) | |
tree | 6e6af155a05b398a4927bee2aa6004ec93cd73b9 | |
parent | 6c570d4e5a66ca2d49295f6352c71cee6ae32097 (diff) | |
download | ampache-88cac15dd7d3af9fb87d1a430c079205b91801a0.tar.gz ampache-88cac15dd7d3af9fb87d1a430c079205b91801a0.tar.bz2 ampache-88cac15dd7d3af9fb87d1a430c079205b91801a0.zip |
fixed stream/localplay buttons and the mpd skip now works *gasp*
-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> |