diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-22 05:36:07 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-22 05:36:07 +0000 |
commit | df348122a7092a24a4ae5c04cf0b5b85bd750ae0 (patch) | |
tree | 79204441a824bafe239a5e8e8de596b87c0aa999 /lib/class | |
parent | 696f35b5a3e148282c452810ac2b294a68b074e0 (diff) | |
download | ampache-df348122a7092a24a4ae5c04cf0b5b85bd750ae0.tar.gz ampache-df348122a7092a24a4ae5c04cf0b5b85bd750ae0.tar.bz2 ampache-df348122a7092a24a4ae5c04cf0b5b85bd750ae0.zip |
added the initial playlist view page, fixed the artist name on albums of the moment
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/album.class.php | 6 | ||||
-rw-r--r-- | lib/class/playlist.class.php | 4 | ||||
-rw-r--r-- | lib/class/user.class.php | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index dc42aa2d..f19d26cc 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -215,10 +215,12 @@ class Album { $this->f_title = $name; if ($this->artist_count == '1') { $artist = scrub_out(truncate_with_ellipsis(trim($this->artist_prefix . ' ' . $this->artist_name),Config::get('ellipsis_threshold_album'))); - $this->f_artist = "<a href=\"$web_path/artists.php?action=show&artist=" . $this->artist_id . "\">" . $artist . "</a>"; + $this->f_artist_link = "<a href=\"$web_path/artists.php?action=show&artist=" . $this->artist_id . "\">" . $artist . "</a>"; + $this->f_artist = $artist; } else { - $this->f_artist = "<div title=\"$this->artist_count " . _('Artists') . "\">" . _('Various') . "</div>"; + $this->f_artist_link = "<div title=\"$this->artist_count " . _('Artists') . "\">" . _('Various') . "</div>"; + $this->f_artist = _('Various'); } if ($this->year == '0') { diff --git a/lib/class/playlist.class.php b/lib/class/playlist.class.php index 493e335a..fcc7f028 100644 --- a/lib/class/playlist.class.php +++ b/lib/class/playlist.class.php @@ -108,7 +108,7 @@ class Playlist { $results = array(); - $sql = "SELECT `object_id`,`object_type`,`dynamic_song` FROM `playlist_data` WHERE `playlist`='" . Dba::escape($this->id) . "' ORDER BY `track`"; + $sql = "SELECT `object_id`,`object_type`,`dynamic_song`,`track` FROM `playlist_data` WHERE `playlist`='" . Dba::escape($this->id) . "' ORDER BY `track`"; $db_results = Dba::query($sql); while ($row = Dba::fetch_assoc($db_results)) { @@ -117,7 +117,7 @@ class Playlist { // Do something here FIXME! } - $results[] = array('type'=>$row['object_type'],'object_id'=>$row['object_id']); + $results[] = array('type'=>$row['object_type'],'object_id'=>$row['object_id'],'track'=>$row['track']); } // end while return $results; diff --git a/lib/class/user.class.php b/lib/class/user.class.php index ca74badf..9ecc247a 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -568,7 +568,7 @@ class User { $last_song = new Song($data['object_id']); if ($data['date']+($song_info->time/2) >= time()) { debug_event('Stats','Not collecting stats less then 50% of song has elapsed','3'); - return false; + return false; } // Check if lastfm is loaded, if so run the update |