From 2662f5828f0e0bd44f154210f276beec4177bf8b Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Sun, 17 Jan 2016 14:19:08 +0100 Subject: If atom feed item has multiple enclosures, use first one --- .../danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java index 7355a733b..b23a142af 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java +++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java @@ -91,11 +91,11 @@ public class NSAtom extends Namespace { } String type = attributes.getValue(LINK_TYPE); if (SyndTypeUtils.enclosureTypeValid(type) - state.getCurrentItem().setMedia( - new FeedMedia(state.getCurrentItem(), href, - size, type) - ); || (type = SyndTypeUtils.getValidMimeTypeFromUrl(href)) != null) { + FeedItem currItem = state.getCurrentItem(); + if(!currItem.hasMedia()) { + currItem.setMedia(new FeedMedia(currItem, href, size, type)); + } } } else if (rel.equals(LINK_REL_PAYMENT)) { state.getCurrentItem().setPaymentLink(href); -- cgit v1.2.3