diff --git a/lib/global.php b/lib/global.php index 4795470..c94862e 100644 --- a/lib/global.php +++ b/lib/global.php @@ -2,7 +2,7 @@ /* Smarty stuff */ $version = 0.5; - + if (get_magic_quotes_gpc()) { /* Deal with Magic quotes. We can safely strip these off as we're not using a database. */ $_REQUEST = array_map('stripslashes', $_REQUEST); @@ -65,6 +65,7 @@ $smarty->assign('control_link', 'index.php?page=control'); $smarty->assign('playlist_play_link', 'index.php?page=control&action=play&skipto='); $smarty->assign('playlist_clear_link', 'index.php?action=clear'); + $smarty->assign('mpd_state', $mympd->state); /* first check for a page cookie, and default to displaying the playlist */ if ($_GET['page']) { @@ -78,7 +79,7 @@ if (!$page) { $page = 'playlist'; } - + //echo $mympd->current_track_length, ' - ', $mympd->current_track_position; $smarty->assign('page', $page); diff --git a/templates/default/control.html b/templates/default/control.html index cf5b07d..82bde6c 100644 --- a/templates/default/control.html +++ b/templates/default/control.html @@ -1,8 +1,8 @@ -
{if $current_title}{$current_track_no+1|string_format:"%02d"}. {$current_title}
{$current_artist} {if $current_album}{/if}{elseif $current_file}{$current_file}{else}
[Nothing playing]{/if}
- - {if $coverimage}
{/if} - - -
 
-
PreviousPlayPauseStopNext
+ +
{if $current_title}{$current_track_no+1|string_format:"%02d"}. {$current_title}
{$current_artist} {if $current_album}{/if}{elseif $current_file}{$current_file}{else}
[Nothing playing]{/if}
+ + {if $mpd_state == 'play' || $mpd_state == 'pause'}
 
{/if} + + {if $coverimage}
{/if} + diff --git a/templates/default/styles.css b/templates/default/styles.css index b4ff2e5..662bfe3 100644 --- a/templates/default/styles.css +++ b/templates/default/styles.css @@ -107,7 +107,7 @@ img.button { } #song_display { width: 215px; - margin: 0px auto 5px; + margin: 5px auto 5px; /* height: 55px; */ text-align: center; font-size: 12px; @@ -137,21 +137,22 @@ li.playing { } #progress { border: 1px solid #666; - padding: 2px; + padding: 0px; width: 200px; height: 6px; - margin-top: 3px; - margin-left: auto; - margin-right: auto; + margin: 5px auto; text-align: left; } #progressbar { font-size: 1px; - background: #ddd; + background: #ccc; height: 6px; margin: 0px; padding: 0px; } +#cover_image { + margin: 10px auto; +} img#cover { border: 1px solid #666; padding: 2px;