From 698f783df3fcf0efe81e91b25aebf7c4909edb5c Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 10 Aug 2023 11:44:12 +0200 Subject: [PATCH] fix: improve thumbnail quality in notification --- .../java/com/github/libretube/util/NowPlayingNotification.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt b/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt index 0c86e7eef..1511cbca8 100644 --- a/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt +++ b/app/src/main/java/com/github/libretube/util/NowPlayingNotification.kt @@ -288,6 +288,8 @@ class NowPlayingNotification( builder.putString(MediaMetadataCompat.METADATA_KEY_ALBUM_ART_URI, it) } + builder.putBitmap(MediaMetadataCompat.METADATA_KEY_ALBUM_ART, notificationBitmap) + val playerDuration = player.duration if (playerDuration != C.TIME_UNSET) { @@ -415,6 +417,7 @@ class NowPlayingNotification( } } .build() + mediaSession.setMetadata(getMetadataFromPlayer(player.mediaMetadata)) nManager.notify(PLAYER_NOTIFICATION_ID, notification) }