fix: improve thumbnail quality in notification

This commit is contained in:
Bnyro 2023-08-10 11:44:12 +02:00
parent 5b5a644cce
commit 698f783df3

View File

@ -288,6 +288,8 @@ class NowPlayingNotification(
builder.putString(MediaMetadataCompat.METADATA_KEY_ALBUM_ART_URI, it) builder.putString(MediaMetadataCompat.METADATA_KEY_ALBUM_ART_URI, it)
} }
builder.putBitmap(MediaMetadataCompat.METADATA_KEY_ALBUM_ART, notificationBitmap)
val playerDuration = player.duration val playerDuration = player.duration
if (playerDuration != C.TIME_UNSET) { if (playerDuration != C.TIME_UNSET) {
@ -415,6 +417,7 @@ class NowPlayingNotification(
} }
} }
.build() .build()
mediaSession.setMetadata(getMetadataFromPlayer(player.mediaMetadata))
nManager.notify(PLAYER_NOTIFICATION_ID, notification) nManager.notify(PLAYER_NOTIFICATION_ID, notification)
} }