From 20e025bd2e72ede506cb326ffdb5a13dd2e4fcf9 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 27 Oct 2019 22:52:41 +0100 Subject: [PATCH] Prefer image that is specified in feed over embedded image --- .../java/de/danoeh/antennapod/core/feed/FeedItem.java | 8 ++++---- .../java/de/danoeh/antennapod/core/feed/FeedMedia.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java index ecd34acff..8d123a432 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedItem.java @@ -375,10 +375,10 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, ImageR @Override public String getImageLocation() { - if(media != null && media.hasEmbeddedPicture()) { - return media.getImageLocation(); - } else if (imageUrl != null) { - return imageUrl; + if (imageUrl != null) { + return imageUrl; + } else if (media != null && media.hasEmbeddedPicture()) { + return media.getLocalMediaUrl(); } else if (feed != null) { return feed.getImageLocation(); } else { diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java index b1c2ff15a..572f32e66 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java @@ -566,10 +566,10 @@ public class FeedMedia extends FeedFile implements Playable { @Override public String getImageLocation() { - if (hasEmbeddedPicture()) { - return getLocalMediaUrl(); - } else if(item != null) { + if (item != null) { return item.getImageLocation(); + } else if (hasEmbeddedPicture()) { + return getLocalMediaUrl(); } else { return null; }