diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-04 05:37:15 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-04 05:37:15 +0000 |
commit | 1068c367ac5ee03fc799773289786863689da5bd (patch) | |
tree | 2df7950b9a110160233e22392526096ac2589550 | |
parent | 560dbe70f23b4353b5d98736fb16dd088d4f269a (diff) | |
download | ampache-1068c367ac5ee03fc799773289786863689da5bd.tar.gz ampache-1068c367ac5ee03fc799773289786863689da5bd.tar.bz2 ampache-1068c367ac5ee03fc799773289786863689da5bd.zip |
* Fixed Single Artist view if you have 50+ albums
* Tweaked Recently Played text to make translations a little easier
* Removed unused Config options
* Added array definition if only one users exists
-rw-r--r-- | albums.php | 10 | ||||
-rw-r--r-- | artists.php | 2 | ||||
-rw-r--r-- | config/ampache.cfg.php.dist | 9 | ||||
-rwxr-xr-x | docs/CHANGELOG | 6 | ||||
-rw-r--r-- | lib/class/user.class.php | 5 | ||||
-rw-r--r-- | templates/show_recently_played.inc.php | 2 |
6 files changed, 15 insertions, 19 deletions
@@ -148,16 +148,12 @@ switch ($action) { /* Check to see if we have the image url still */ $image_id = $_REQUEST['image']; $album_id = $_REQUEST['album_id']; - - $url = $_SESSION['form']['images'][$image_id]['url']; - $mime = $_SESSION['form']['images'][$image_id]['mime']; - $snoopy = new Snoopy(); - $snoopy->fetch($url); - $image_data = $snoopy->results; + $image = get_image_from_source($_SESSION['form']['images'][$image_id]); + $mime = $_SESSION['form']['images'][$image_id]['mime']; $album = new Album($album_id); - $album->insert_art($image_data,$mime); + $album->insert_art($image,$mime); show_confirmation(_('Album Art Inserted'),'',"/albums.php?action=show&album=$album_id"); diff --git a/artists.php b/artists.php index b84e1ed1..03420e58 100644 --- a/artists.php +++ b/artists.php @@ -60,7 +60,7 @@ switch($action) { if (!$sort_order) { $sort_order = 'album.name'; } $db_results = mysql_query($sql, dbh()); $total_items = mysql_num_rows($db_results); - if ($match != "Show_all") { $offset_limit = $_SESSION['userdata']['offset_limit']; } + $offset_limit = $total_items; $view = new View($sql, 'artists.php',$sort_order,$total_items,$offset_limit); } diff --git a/config/ampache.cfg.php.dist b/config/ampache.cfg.php.dist index 2780c309..b95fc5a6 100644 --- a/config/ampache.cfg.php.dist +++ b/config/ampache.cfg.php.dist @@ -266,15 +266,6 @@ debug_level = 5 # DEFAULT: NULL #log_path = "/var/log/ampache" -# Max Upload Size -# This sets what the max file-size for an uploaded -# file, this is good at preventing someone from -# filling up your HDD. It is measured in bytes -# Example 1024 = 1K, 1048576 = 1MB -# Default size limit is 10Mb -# DEFAULT: 10485760 -max_upload_size = "10485760" - # Charset of generated HTML pages # Default of UTF-8 should work for most poeple # DEFAULT: UTF-8 diff --git a/docs/CHANGELOG b/docs/CHANGELOG index d19467b7..1c46b169 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,12 @@ -------------------------------------------------------------------------- v.3.3.3-Beta3 + - Fixed a view issue introduced when sorting of the albums under + single artist view was added + - Removed unused options from config file + - Fixed some remaining album art issues and a undefined array() + issue if you only have one user and try to view + recommendations - Fixed some get_info() references in song.class.php that caused XBMC to not work. - Added Die,Das,Ein,Eine as prefix's for album names (Thx Vogi) diff --git a/lib/class/user.class.php b/lib/class/user.class.php index f4a00387..48d36a29 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -220,6 +220,9 @@ class User { "WHERE object_type='" . sql_escape($type) . "' AND user='" . sql_escape($this->id) . "'"; $db_results = mysql_query($sql,dbh()); + // Incase they only have one user + $users = array(); + while ($r = mysql_fetch_assoc($db_results)) { /* Store the fact that you rated this */ $key = $r['object_id']; @@ -242,8 +245,8 @@ class User { * sort the users[$key] array by value and then find things they've rated high (4+) that you * haven't rated */ - asort($users); $recommendations = array(); + asort($users); foreach ($users as $user_id=>$score) { diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index e30ee53e..f4df01b6 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -30,7 +30,7 @@ $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days a <td><?php echo _('Song'); ?></td> <td><?php echo _('Album'); ?></td> <td><?php echo _('Artist'); ?></td> - <td> </td> + <td><?php echo _('Last Played'); ?></td> </tr> <?php foreach ($data as $row) { $row_user = new User($row['user']); |