diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-11-29 00:35:19 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-11-29 00:35:19 +0000 |
commit | 0068d79a8b3c9c9caceb7b1e12d71b03825d5b55 (patch) | |
tree | 17291751f4dbd98d5590558d07eaba27197978c3 /lib | |
parent | 1ebc196f6c81ef19dddf5e36d44da84b63bb3635 (diff) | |
download | ampache-0068d79a8b3c9c9caceb7b1e12d71b03825d5b55.tar.gz ampache-0068d79a8b3c9c9caceb7b1e12d71b03825d5b55.tar.bz2 ampache-0068d79a8b3c9c9caceb7b1e12d71b03825d5b55.zip |
unrandom counted the play random so its only randomly ordered... say that three times fast
Diffstat (limited to 'lib')
-rw-r--r-- | lib/class/album.class.php | 2 | ||||
-rw-r--r-- | lib/class/playlist.class.php | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index b2db78a0..af2cd200 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -326,7 +326,7 @@ class Album { $results = array(); - $sql = "SELECT id FROM song WHERE album='$this->id' ORDER BY RAND() LIMIT " . rand(1,$this->songs); + $sql = "SELECT id FROM song WHERE album='$this->id' ORDER BY RAND()"; $db_results = mysql_query($sql, dbh()); while ($r = mysql_fetch_array($db_results)) { diff --git a/lib/class/playlist.class.php b/lib/class/playlist.class.php index 7fa55492..b42ca188 100644 --- a/lib/class/playlist.class.php +++ b/lib/class/playlist.class.php @@ -344,12 +344,10 @@ class Playlist { $total_songs = mysql_fetch_row($db_results); - $limit = rand(1,$total_songs[0]); - // Fetch playlist items $sql = "SELECT song, track FROM playlist_data" . " WHERE playlist = '$this->id'" . - " ORDER BY RAND() LIMIT $limit"; + " ORDER BY RAND()"; $db_results = mysql_query($sql, dbh()); while ($r = mysql_fetch_object($db_results)) { $song_ids[] = $r->song; |