Skip to content

Commit

Permalink
Fixes an issue where the artist albums would not display properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Dec 20, 2016
1 parent 115c395 commit 289a0b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Change Log
## 1.0.1
- Fixes a crash with a null extras payload when updating the widget.
- Fixes a crash with a null key event on the media intent handler.
- Fixes an issue where the artist albums would not display properly.

## 1.0.0
- Fixes an issue where the notification would not disappear on a connected wearable after closing MusicBee.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ class LocalAlbumDataSource

fun getAlbumsByArtist(artist: String): Single<FlowCursorList<Album>> {
return Single.create<FlowCursorList<Album>> {
val selectAlbum = SQLite.select(Album_Table.album.withTable(), Album_Table.artist.withTable())
val selectAlbum = SQLite.select(Album_Table.album.withTable(), Album_Table.artist.withTable()).distinct()
val modelQueriable = (selectAlbum from Album::class
leftOuterJoin Track::class
on Track_Table.album.withTable().eq(album.withTable())
on Track_Table.artist.withTable().eq(Album_Table.artist.withTable())
where Track_Table.artist.withTable().`is`(artist)
groupBy Track_Table.album_artist.withTable())
or Track_Table.album_artist.withTable().`is`(artist)
and Track_Table.album.withTable().`is`(album.withTable()))
.orderBy(Album_Table.artist.withTable(), true)
.orderBy(album.withTable(), true)
val cursor = FlowCursorList.Builder(Album::class.java).modelQueriable(modelQueriable).build()
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/raw/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
versionName="1.0.1">
<changelogbug>Fixes a crash with a null extras payload when updating the widget.</changelogbug>
<changelogbug>Fixes a crash with a null key event on the media intent handler.</changelogbug>
<changelogbug>Fixes an issue where the artist albums would not display properly.</changelogbug>
</changelogversion>
<changelogversion
changeDate="Dec 15,2016"
Expand Down

0 comments on commit 289a0b2

Please sign in to comment.