Fixes Atom icon image
Falls back to logo if it is present but icon isn't. https://github.com/AntennaPod/AntennaPod/issues/1949
This commit is contained in:
parent
44b37fc043
commit
baf1569020
|
@ -29,7 +29,8 @@ public class NSAtom extends Namespace {
|
||||||
private static final String UPDATED = "updated";
|
private static final String UPDATED = "updated";
|
||||||
private static final String AUTHOR = "author";
|
private static final String AUTHOR = "author";
|
||||||
private static final String CONTENT = "content";
|
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 SUBTITLE = "subtitle";
|
||||||
private static final String PUBLISHED = "published";
|
private static final String PUBLISHED = "published";
|
||||||
|
|
||||||
|
@ -194,10 +195,11 @@ public class NSAtom extends Namespace {
|
||||||
state.getCurrentItem().setPubDate(DateUtils.parse(content));
|
state.getCurrentItem().setPubDate(DateUtils.parse(content));
|
||||||
} else if (PUBLISHED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null) {
|
} else if (PUBLISHED.equals(top) && ENTRY.equals(second) && state.getCurrentItem() != null) {
|
||||||
state.getCurrentItem().setPubDate(DateUtils.parse(content));
|
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));
|
state.getFeed().setImage(new FeedImage(state.getFeed(), content, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue