Commit Graph
14 Commits
Author SHA1 Message Date
advplyrandadvplyr fe67a221ac Render a higher resolution cover in the Android notification background (#1917)
* Render a higher resolution bitmap in the notification background art

Previously only METADATA_KEY_ALBUM_ART_URI/ART_URI were set, leaving notification/lock-screen/Android Auto consumers to resolve the cover art themselves. Likely due to internal scaling, a lower quality bitmap was loaded.

This commit adds a shared resolveUriAsBitmap() helper (extracted from AbMediaDescriptionAdapter.kt) and uses it to:
  - Resolve and cache a bitmap on PlaybackSession once per
  session (synchronously for local covers, asynchronously for server covers), then set it on METADATA_KEY_ALBUM_ART/ART once available, falling back to the URI keys until it resolves.
  - Reuse the same helper in AbMediaDescriptionAdapter so the notification icon is resolved consistently.

  PlayerNotificationService tracks the resolution Job and cancels/replaces it on each new playback session, invalidating the media session metadata once the bitmap is ready.

* Remove the size override in Glide

The override was not needed. It wasn't in the original code, so I'll remove it for consistency.

* Update notification icon to reuse cover bitmap if already loaded on session

---------

Co-authored-by: advplyr <advplyr@protonmail.com>
2026-08-04 16:58:47 -05:00
advplyr bba15dacf8 Added translation using Weblate (Tamil) 2026-08-01 22:53:32 +00:00
advplyr bcc292b33a Added translation using Weblate (Uzbek) 2026-08-01 22:53:22 +00:00
advplyr 8a253e7679 Added translation using Weblate (Latvian) 2026-08-01 22:53:17 +00:00
advplyr 24b98f10e3 Added translation using Weblate (Greek) 2025-12-12 23:13:07 +00:00
advplyr ca222d4110 Added translation using Weblate (Icelandic) 2025-12-12 23:13:02 +00:00
advplyr 892686b213 Update components/app/AudioPlayer.vue 2025-11-23 15:44:41 -06:00
advplyr 495ec80ebd Added translation using Weblate (Korean) 2025-11-19 15:03:24 +01:00
advplyr c2b598d98e Added translation using Weblate (Persian) 2025-09-23 15:38:29 +02:00
advplyr 27a14a6e3b Added translation using Weblate (Turkish) 2025-02-02 22:05:07 +00:00
advplyr ef61e020b6 Added translation using Weblate (Japanese) 2025-01-26 22:35:03 +01:00
advplyr 42ff4e877a Added translation using Weblate (Belarusian) 2024-12-27 23:11:11 +00:00
advplyr 8c77a19eb6 Update android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt 2024-08-31 09:33:24 -05:00
advplyr 98a465c7b4 Update components/app/AudioPlayer.vue 2024-01-01 10:51:46 -06:00