Skip to content

Commit

Permalink
Merge branch 'fcharlier-fix_missing_recently_albums' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiix committed Dec 17, 2016
2 parents 2cded9d + c2fa6d9 commit 4baef6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#### Bug / Security fixes:
* Merge #215: Playlist title cannot be empty (Thanks to disc)
* Merge #236: Fix missing albums in recently added albums (Thanks to fcharlier)
* Fix #207: Broken disc info on OGG files
* Fix #199: Improve the message on the cli tool
* Fix #196: Error on import when people mess with dates
Expand Down
8 changes: 4 additions & 4 deletions app/Controller/SongsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function albums() {
if ($page == 1) {
$latests = $this->Song->find('all', array(
'fields' => array('Song.id', 'Song.band', 'Song.album', 'Song.cover'),
'group' => 'Song.album',
'group' => array('Song.album', 'Song.band'),
'order' => 'Song.created DESC',
'limit' => 6
));
Expand All @@ -246,14 +246,14 @@ public function albums() {
} else {
$subQuery = $db->buildStatement(
array(
'fields' => array('MIN(subsong.id)', 'subsong.album'),
'fields' => array('MIN(subsong.id)', 'subsong.album', 'subsong.band'),
'table' => $db->fullTableName($this->Song),
'alias' => 'subsong',
'group' => 'subsong.album'
'group' => array('subsong.album', 'subsong.band')
),
$this->Song
);
$subQuery = ' (Song.id, Song.album) IN (' . $subQuery . ') ';
$subQuery = ' (Song.id, Song.album, Song.band) IN (' . $subQuery . ') ';

if ($page == 1) {
$latests = $this->Song->find('all', array(
Expand Down

0 comments on commit 4baef6c

Please sign in to comment.