diff options
author | xgizzmo <xgizzmo@ampache> | 2006-08-16 11:36:58 +0000 |
---|---|---|
committer | xgizzmo <xgizzmo@ampache> | 2006-08-16 11:36:58 +0000 |
commit | 94991b185cc8e0048194e77749593c0388636444 (patch) | |
tree | 25461285f047dd41b9bdceb00bd204926dd0bf45 | |
parent | 0cf99f9a6c1a797017c146d8a7f19da934c153c4 (diff) | |
download | ampache-94991b185cc8e0048194e77749593c0388636444.tar.gz ampache-94991b185cc8e0048194e77749593c0388636444.tar.bz2 ampache-94991b185cc8e0048194e77749593c0388636444.zip |
fixed pause function in localplay (thanks Salguod) bug #923
-rw-r--r-- | lib/class/localplay.class.php | 18 | ||||
-rw-r--r-- | templates/show_localplay_control.inc.php | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php index b6cacfd5..0b401bdc 100644 --- a/lib/class/localplay.class.php +++ b/lib/class/localplay.class.php @@ -412,6 +412,24 @@ class Localplay { } // prev + /** + * pause + * This isn't a required function, it tells the daemon to pause the + * song + */ + function pause() { + + $function = $this->_function_map['pause']; + + if (!$this->_player->$function()) { + debug_event('localplay','Error: Unable to pause song, check ' . $this->type . ' controller','1'); + return false; + } + + return true; + + } // pause + /** * get_preferences * This functions returns an array of the preferences that the localplay diff --git a/templates/show_localplay_control.inc.php b/templates/show_localplay_control.inc.php index 2c8d74b5..b9558ade 100644 --- a/templates/show_localplay_control.inc.php +++ b/templates/show_localplay_control.inc.php @@ -37,7 +37,7 @@ $ajax_url = $web_path . '/server/ajax.server.php'; <img src="<?php echo $web_path; ?>/images/localplay/stop.gif" alt="stop" /> </span> <?php if ($localplay->has_function('pause')) { ?> -<span id="pause_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=pause<?php echo $requird_info; ?>','localplay_state');return true;"> +<span id="pause_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=pause<?php echo $required_info; ?>','localplay_state');return true;"> <img src="<?php echo $web_path; ?>/images/localplay/pause.gif" alt="pause" /> </span> <?php } ?> |