Skip to content

Commit

Permalink
Twelve: Fix searching on Subsonic demo server
Browse files Browse the repository at this point in the history
Change-Id: I0ec23e32182361c3b47a07ad6532d2314e2745e0
  • Loading branch information
SebaUbuntu committed Nov 22, 2024
1 parent 50b46de commit 9651832
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ class SubsonicDataSource(arguments: Bundle) : MediaDataSource {

override fun search(query: String) = suspend {
subsonicClient.search3(query).toRequestStatus {
song.map { it.toMediaItem() } +
artist.map { it.toMediaItem() } +
album.map { it.toMediaItem() }
song.orEmpty().map { it.toMediaItem() } +
artist.orEmpty().map { it.toMediaItem() } +
album.orEmpty().map { it.toMediaItem() }
}
}.asFlow()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
@Suppress("PROVIDED_RUNTIME_TOO_LOW")
@Serializable
data class SearchResult3(
val artist: List<ArtistID3>,
val album: List<AlbumID3>,
val song: List<Child>,
val artist: List<ArtistID3>? = null,
val album: List<AlbumID3>? = null,
val song: List<Child>? = null,
)

0 comments on commit 9651832

Please sign in to comment.