diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-02-02 02:01:23 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-02-02 02:01:23 +0000 |
commit | 0a2b41b143419e85b968a675c8b83a1c15615399 (patch) | |
tree | 06eacdb8a9811e3d541130531fdc8a516029a43c | |
parent | a6ad247623c807334c19a7daba03d2aad522c79f (diff) | |
download | ampache-0a2b41b143419e85b968a675c8b83a1c15615399.tar.gz ampache-0a2b41b143419e85b968a675c8b83a1c15615399.tar.bz2 ampache-0a2b41b143419e85b968a675c8b83a1c15615399.zip |
fixed localplay not showing current playing song and clear playlist not refreshing the screen
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | localplay.php | 3 | ||||
-rw-r--r-- | server/localplay.ajax.php | 6 | ||||
-rw-r--r-- | templates/show_localplay_control.inc.php | 2 | ||||
-rw-r--r-- | templates/show_localplay_playlist.inc.php | 2 | ||||
-rw-r--r-- | templates/show_localplay_status.inc.php | 30 |
6 files changed, 28 insertions, 17 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 8304a42a..53b56d7a 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3-5-Alpha2 + - Fixed now playing now showing currently playing song + - Fixed now playing clear all not correctly refreshing screen - Fixed adding object to playlist so that it correctly shows the songs rather then an empty playlist - Added User Agent to IP History information gathering diff --git a/localplay.php b/localplay.php index 538d4d08..27871aa0 100644 --- a/localplay.php +++ b/localplay.php @@ -88,8 +88,5 @@ switch ($_REQUEST['action']) { break; } // end switch action - - show_footer(); - ?> diff --git a/server/localplay.ajax.php b/server/localplay.ajax.php index 6fcdf1cc..6d96d59e 100644 --- a/server/localplay.ajax.php +++ b/server/localplay.ajax.php @@ -78,10 +78,10 @@ switch ($_REQUEST['action']) { break; case 'delete_all': $localplay->delete_all(); - + Browse::save_objects(array()); ob_start(); - require_once Config::get('prefix') . '/templates/show_localplay_playlist.inc.php'; - $results['localplay_playlist'] = ob_get_contents(); + Browse::show_objects(); + $results['browse_content'] = ob_get_contents(); ob_end_clean(); break; case 'skip': diff --git a/templates/show_localplay_control.inc.php b/templates/show_localplay_control.inc.php index 4962a8a0..74bb8acf 100644 --- a/templates/show_localplay_control.inc.php +++ b/templates/show_localplay_control.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All rights reserved. This program is free software; you can redistribute it and/or diff --git a/templates/show_localplay_playlist.inc.php b/templates/show_localplay_playlist.inc.php index fe0eb84b..d59875c7 100644 --- a/templates/show_localplay_playlist.inc.php +++ b/templates/show_localplay_playlist.inc.php @@ -19,6 +19,8 @@ */ $localplay = new Localplay(Config::get('localplay_controller')); +$localplay->connect(); +$status = $localplay->status(); ?> <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> <table class="tabledata" cellpadding="0" cellspacing="0"> diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php index b576275e..fa0c4b63 100644 --- a/templates/show_localplay_status.inc.php +++ b/templates/show_localplay_status.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2007 Ampache.org + Copyright (c) Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -23,19 +23,29 @@ $status = $localplay->status(); ?> <?php Ajax::start_container('localplay_status'); ?> <?php show_box_top(_('Localplay Control')); ?> -<strong><?php echo $localplay->get_user_state($status['state']) ?></strong><br /> - +<?php echo _('Now Playing'); ?>:<i><?php echo $status['track_title']; ?> - <?php echo $status['track_album']; ?> - <?php echo $status['track_artist']; ?></i> +<div id="information_actions"> +<ul> +<li> <?php echo Ajax::button('?page=localplay&action=command&command=volume_mute','volumemute',_('Mute'),'localplay_mute'); ?> <?php echo Ajax::button('?page=localplay&action=command&command=volume_down','volumedn',_('Decrease Volume'),'localplay_volume_dn'); ?> <?php echo Ajax::button('?page=localplay&action=command&command=volume_up','volumeup',_('Increase Volume'),'localplay_volume_up'); ?> -<strong><?php echo _('Volume'); ?>:</strong><?php echo $status['volume']; ?>% -<br /> - <strong><?php echo _('Repeat') . ":"; ?></strong> <?php echo print_boolean($status['repeat']); ?> | +<?php echo _('Volume'); ?>:<?php echo $status['volume']; ?>% +</li> +<li> + <?php echo print_boolean($status['repeat']); ?> | <?php echo Ajax::text('?page=localplay&action=repeat&value=' . invert_boolean($status['repeat']),print_boolean(invert_boolean($status['repeat'])),'localplay_repeat'); ?> - - <strong><?php echo _('Random') . ":"; ?></strong> <?php echo print_boolean($status['random']); ?> | + <?php echo _('Repeat'); ?> +</li> +<li> + <?php echo print_boolean($status['random']); ?> | <?php echo Ajax::text('?page=localplay&action=random&value=' . invert_boolean($status['random']),print_boolean(invert_boolean($status['random'])),'localplay_random'); ?> - <br /> -<?php echo Ajax::text('?page=localplay&action=command&command=delete_all',_('Clear Playlist'),'localplay_clear_all'); ?> + <?php echo _('Random'); ?> +</li> +<li> + <?php echo Ajax::button('?page=localplay&action=command&command=delete_all','delete',_('Clear Playlist'),'localplay_clear_all'); ?><?php echo _('Clear Playlist'); ?> +</li> +</ul> +</div> <?php show_box_bottom(); ?> <?php Ajax::end_container(); ?> |