From e32c9e90ff8d30ae533be11df09e93602dd9e893 Mon Sep 17 00:00:00 2001 From: Hans-Peter Lehmann Date: Thu, 9 Jul 2026 08:10:35 +0200 Subject: [PATCH] Fix local folder playback not showing cover (#8580) ### Description Fix local folder playback not showing cover Closes #8562 ### Checklist - [x] I have read the contribution guidelines: https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request - [x] I have performed a self-review of my code, going through my changes line by line and carefully considering why this line change is necessary - [x] I have run the automated code checks using `./gradlew checkstyle lint` - [x] My code follows the style guidelines of the AntennaPod project: https://antennapod.org/contribute/develop/app/code-style - [x] I have mentioned the corresponding issue and the relevant keyword (e.g., "Closes: #xy") in the description (see https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) - [x] If it is a core feature, I have added automated tests --- .../danoeh/antennapod/playback/base/MediaItemAdapter.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/playback/base/src/main/java/de/danoeh/antennapod/playback/base/MediaItemAdapter.java b/playback/base/src/main/java/de/danoeh/antennapod/playback/base/MediaItemAdapter.java index 603dd47d7..7782d9491 100644 --- a/playback/base/src/main/java/de/danoeh/antennapod/playback/base/MediaItemAdapter.java +++ b/playback/base/src/main/java/de/danoeh/antennapod/playback/base/MediaItemAdapter.java @@ -116,10 +116,11 @@ public class MediaItemAdapter { private static Bitmap loadArtworkBitmap(Context context, Playable playable, int iconSize) { try { + String imageLocation = playable.getImageLocation(); return Glide.with(context) .asBitmap() - .onlyRetrieveFromCache(true) - .load(playable.getImageLocation()) + .onlyRetrieveFromCache(imageLocation != null && imageLocation.startsWith("http")) + .load(imageLocation) .submit(iconSize, iconSize) .get(500, TimeUnit.MILLISECONDS); } catch (Exception tr1) { @@ -139,7 +140,7 @@ public class MediaItemAdapter { try { return Glide.with(context) .asBitmap() - .onlyRetrieveFromCache(true) + .onlyRetrieveFromCache(fallback.startsWith("http")) .load(fallback) .submit(iconSize, iconSize) .get(500, TimeUnit.MILLISECONDS);