Skip to content

Commit

Permalink
one more fix for null artists cuz ye
Browse files Browse the repository at this point in the history
  • Loading branch information
brahmkshatriya committed Mar 3, 2024
1 parent bffa170 commit 2093c67
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.ContentUris
import android.content.Context
import android.net.Uri
import android.provider.MediaStore
import androidx.core.database.getStringOrNull
import dev.brahmkshatriya.echo.common.models.Album
import dev.brahmkshatriya.echo.common.models.Artist
import dev.brahmkshatriya.echo.common.models.ImageHolder.Companion.toImageHolder
Expand Down Expand Up @@ -93,7 +94,7 @@ class TrackResolver(val context: Context) {
Track(
uri = uri,
title = it.getString(titleColumn),
artists = listOf(Artist.Small(artistUri, it.getString(artistColumn))),
artists = listOf(Artist.Small(artistUri, it.getStringOrNull(artistColumn) ?: "PROBLEM CHILD")),
album = Album.Small(albumUri, it.getString(albumColumn)),
cover = coverUri.toImageHolder(),
duration = it.getLong(durationColumn),
Expand Down

0 comments on commit 2093c67

Please sign in to comment.