diff options
author | Cj Malone <Cj-Malone@users.noreply.github.com> | 2016-07-20 11:34:48 +0100 |
---|---|---|
committer | Cj Malone <Cj-Malone@users.noreply.github.com> | 2016-07-20 11:34:48 +0100 |
commit | baf15690204e3c3993e19aa72486c0bc80b80f52 (patch) | |
tree | 4798b75604d1c6c734dd505fe2aa288799bfdb4a /core/src | |
parent | 44b37fc04303ec1b71d358e3c5b56ee560f9a85d (diff) | |
download | AntennaPod-baf15690204e3c3993e19aa72486c0bc80b80f52.zip |
Fixes Atom icon image
Falls back to logo if it is present but icon isn't.
https://github.com/AntennaPod/AntennaPod/issues/1949
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/atom/NSAtom.java | 8 |
1 files changed, 5 insertions, 3 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 7b5abf053..8410c934c 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 @@ -29,7 +29,8 @@ public class NSAtom extends Namespace { private static final String UPDATED = "updated"; private static final String AUTHOR = "author"; private static final String CONTENT = "content"; - private static final String IMAGE = "logo"; + private static final String IMAGE_LOGO = "logo"; + private static final String IMAGE_ICON = "icon"; private static final String SUBTITLE = "subtitle"; private static final String PUBLISHED = "published"; @@ -194,10 +195,11 @@ public class NSAtom extends Namespace { state.getCurrentItem().setPubDate(DateUtils.parse(content)); } else if (PUBLISHED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null) { state.getCurrentItem().setPubDate(DateUtils.parse(content)); - } else if (IMAGE.equals(top) && state.getFeed() != null && state.getFeed().getImage() == null) { + } else if (IMAGE_LOGO.equals(top) && state.getFeed() != null && state.getFeed().getImage() == null) { + state.getFeed().setImage(new FeedImage(state.getFeed(), content, null)); + } else if (IMAGE_ICON.equals(top) && state.getFeed() != null) { state.getFeed().setImage(new FeedImage(state.getFeed(), content, null)); } } } - } |