diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-16 15:37:31 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-08-16 15:37:31 +0000 |
commit | ce094e4d95762791de7fa32b0a83ab0da7254d70 (patch) | |
tree | de1bade5cf1d376d0ad12b0578a197700bbbfa62 /lib/class/album.class.php | |
parent | aeeb56a33bc863e3aea6f7e9fc96495492cbb2b6 (diff) | |
download | ampache-ce094e4d95762791de7fa32b0a83ab0da7254d70.tar.gz ampache-ce094e4d95762791de7fa32b0a83ab0da7254d70.tar.bz2 ampache-ce094e4d95762791de7fa32b0a83ab0da7254d70.zip |
first step towards multi-disk support, Thx Hugo Haas
Diffstat (limited to 'lib/class/album.class.php')
-rw-r--r-- | lib/class/album.class.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index 25e720f8..23628b5f 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -30,6 +30,7 @@ class Album { public $id; public $name; public $full_name; // Prefix + Name, genereated by format(); + public $disk; public $year; public $prefix; @@ -145,7 +146,7 @@ class Album { $artist_sql = "AND `artist`='" . Dba::escape($artist) . "'"; } - $sql = "SELECT `id` FROM `song` WHERE `album`='$this->id' $artist_sql ORDER BY `track`, `title`"; + $sql = "SELECT `id` FROM `song` WHERE `album`='$this->id' $artist_sql ORDER BY `pos`, `track`, `title`"; if ($limit) { $sql .= " LIMIT $limit"; } $db_results = Dba::query($sql); @@ -670,6 +671,7 @@ class Album { $year = $data['year']; $artist = $data['artist']; $name = $data['name']; + $disk = $data['disk']; $current_id = $this->id; @@ -683,7 +685,7 @@ class Album { Catalog::clean_artists(); } - $album_id = Catalog::check_album($name,$year); + $album_id = Catalog::check_album($name,$year,$disk); if ($album_id != $this->id) { if (!is_array($songs)) { $songs = $this->get_songs(); } foreach ($songs as $song_id) { |