diff options
-rwxr-xr-x | docs/CHANGELOG | 10 | ||||
-rw-r--r-- | lib/init.php | 2 | ||||
-rw-r--r-- | modules/localplay/mpd.controller.php | 22 | ||||
-rw-r--r-- | templates/default.css | 2 | ||||
-rw-r--r-- | templates/show_now_playing.inc | 2 | ||||
-rw-r--r-- | templates/show_now_playing_row.inc.php | 18 | ||||
-rw-r--r-- | templates/sidebar.inc.php | 2 | ||||
-rw-r--r-- | themes/greyblock/templates/default.css | 4 |
8 files changed, 44 insertions, 18 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index b669ac1a..f33ff67c 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -3,6 +3,16 @@ -------------------------------------------------------------------------- -------------------------------------------------------------------------- + v.3.3.3-Alpha1 + - Fixed MPD Controller to attempt to find files based on filename + if they were added outside of ampache + - Tweaked Now Playing to prevent wrapping of Album Art. + - Tweaked stylesheet to fix problem with Firefox and the :active + style on the sidebar with the select drop downs + - Added Options to Mail statistics to users when sending them + a message (Thx pb1dft) + +-------------------------------------------------------------------------- v.3.3.2 10/01/2006 - Updated SQL file, changed default site title - Fixed Duplicate Songs functions that have been broken for a diff --git a/lib/init.php b/lib/init.php index 4a992671..f76f3eb6 100644 --- a/lib/init.php +++ b/lib/init.php @@ -80,7 +80,7 @@ if (!$results['allow_stream_playback']) { /** This is the version.... fluf nothing more... **/ -$results['version'] = '3.3.2'; +$results['version'] = '3.3.3-Alpha1'; $results['raw_web_path'] = $results['web_path']; $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php index b195744e..3501b60e 100644 --- a/modules/localplay/mpd.controller.php +++ b/modules/localplay/mpd.controller.php @@ -319,13 +319,27 @@ class AmpacheMpd { /* Parse out the song ID and then create the song object */ preg_match("/song=(\d+)\&/",$entry['file'],$matches); - $song = new Song($matches['1']); + /* If we don't know it, look up by filename */ + if (!$song->title) { + $filename = sql_escape($entry['file']); + $sql = "SELECT id FROM song WHERE file = '$filename'"; + $db_results = mysql_query($sql, dbh()); + if ($results = mysql_fetch_assoc($db_results)) { + $song = new Song($results['id']); + } + else { + $song = new Song(); + $song->title = _('Unknown'); + } + } + else { + $song = new Song($matches['1']); + } + + /* Make the name pretty */ $song->format_song(); $data['name'] = $song->f_title . ' - ' . $song->f_album . ' - ' . $song->f_artist; - /* Just incase prevent emtpy names */ - if (!$song->title) { $data['name'] = _('Unknown'); } - /* Optional Elements */ $data['link'] = ''; $data['track'] = $entry['Pos']; diff --git a/templates/default.css b/templates/default.css index cb013347..12506f70 100644 --- a/templates/default.css +++ b/templates/default.css @@ -316,7 +316,7 @@ div#sidebar{ background-color:#DDDDDD; } -#sidebar li:active { +#sidebar li.hover:active { background-color:#CCCCCC; z-index:30; } diff --git a/templates/show_now_playing.inc b/templates/show_now_playing.inc index ab5773f5..db9fefd9 100644 --- a/templates/show_now_playing.inc +++ b/templates/show_now_playing.inc @@ -48,7 +48,7 @@ foreach ($results as $item) { /* If we've gotten a non-song object just skip this row */ if (!is_object($song)) { continue; } - if (!$np_user->fullname) { $np_user->fullname = "Unknown User"; } + if (!$np_user->fullname) { $np_user->fullname = "Ampache User"; } require(conf('prefix') . '/templates/show_now_playing_row.inc.php'); diff --git a/templates/show_now_playing_row.inc.php b/templates/show_now_playing_row.inc.php index 9046b719..50f32859 100644 --- a/templates/show_now_playing_row.inc.php +++ b/templates/show_now_playing_row.inc.php @@ -19,20 +19,26 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Prepare the variables */ +$title = scrub_out(truncate_with_ellipse($song->title,'25')); +$album = scrub_out(truncate_with_ellipse($song->f_album_full,'25')); +$artist = scrub_out(truncate_with_ellipse($song->f_artist_full,'25')); + ?> <table class="np_row"> <tr> <td class="np_cell"><?php echo scrub_out($np_user->fullname); ?></td> <td class="np_cell"> - <a title="<?php echo scrub_out($song->f_title); ?>" href="<?php echo $web_path; ?>/song.php?action=single_song&song_id=<?php echo $song->id; ?>"> - <?php echo scrub_out($song->f_title); ?> + <a title="<?php echo scrub_out($song->title); ?>" href="<?php echo $web_path; ?>/song.php?action=single_song&song_id=<?php echo $song->id; ?>"> + <?php echo $title; ?> </a> </td> <td class="np_cell"> - <a title="<?php echo scrub_out($song->f_album); ?>" href="<?php echo $web_path; ?>/albums.php?action=show&album=<?php echo $song->album; ?>"> - <?php echo scrub_out($song->f_album); ?></a> / - <a title="<?php echo scrub_out($song->f_artist); ?>" href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $song->artist; ?>"> - <?php echo scrub_out($song->f_artist); ?> + <a title="<?php echo scrub_out($song->album_full); ?>" href="<?php echo $web_path; ?>/albums.php?action=show&album=<?php echo $song->album; ?>"> + <?php echo $album; ?></a> / + <a title="<?php echo scrub_out($song->artist_full); ?>" href="<?php echo $web_path; ?>/artists.php?action=show&artist=<?php echo $song->artist; ?>"> + <?php echo $artist; ?> </a> </td> <?php if (conf('play_album_art')) { ?> diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index 3cb6650a..d4b5960a 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -144,7 +144,7 @@ $web_path = conf('web_path'); <a href="<?php echo $web_path; ?>/randomplay.php"><?php echo _('Random'); ?></a> </li> <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> - <li> + <li id="sidebar_form"> <form name="sub_random" method="post" enctype="multipart/form-data" action="<?php echo $web_path; ?>/song.php?action=random&method=stream" style="Display:inline"> <select name="random" style="width:8.7em;"> <option value="1">1</option> diff --git a/themes/greyblock/templates/default.css b/themes/greyblock/templates/default.css index 1c12a00f..fbdf3399 100644 --- a/themes/greyblock/templates/default.css +++ b/themes/greyblock/templates/default.css @@ -242,10 +242,6 @@ position: absolute; } -#sidebar li:active { - z-index:0; -} - #sidebar li:hover ul, #sidebar li.sfhover ul { left: auto; } |