Skip to content

Commit

Permalink
Add missing artUri property
Browse files Browse the repository at this point in the history
  • Loading branch information
tvanlaerhoven committed Aug 12, 2024
1 parent 3c8e755 commit 115404e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ private const val PROP_ALBUM_ART = "albumArt"
private const val PROP_ALBUM_ARTIST = "albumArtist"
private const val PROP_ALBUM_ART_URI = "albumArtUri"
private const val PROP_ART = "art"
private const val PROP_ART_URI = "artUri"
private const val PROP_ARTIST = "artist"
private const val PROP_AUTHOR = "author"
private const val PROP_COMPILATION = "compilation"
Expand Down Expand Up @@ -125,6 +126,13 @@ class MediaMetadataProvider(private val connector: MediaSessionConnector) {
builder.putBitmap(MediaMetadataCompat.METADATA_KEY_ART, value)
}

/**
* See [MediaMetadataCompat.METADATA_KEY_ART_URI].
*/
fun setArtUri(value: String?) {
builder.putString(MediaMetadataCompat.METADATA_KEY_ART_URI, value)
}

/**
* See [MediaMetadataCompat.METADATA_KEY_ARTIST].
*/
Expand Down Expand Up @@ -315,6 +323,9 @@ class MediaMetadataProvider(private val connector: MediaSessionConnector) {
if (metadata.containsKey(PROP_ART)) {
setArt(metadata.get(PROP_ART) as? Bitmap)
}
if (metadata.containsKey(PROP_ART_URI)) {
setArtUri(metadata.get(PROP_ART_URI) as? String)
}
if (metadata.containsKey(PROP_ARTIST)) {
setArtist(metadata.get(PROP_ARTIST) as? String)
}
Expand Down

0 comments on commit 115404e

Please sign in to comment.