diff --git a/app/src/main/java/com/readrops/app/utils/matchers/ItemMatcher.java b/app/src/main/java/com/readrops/app/utils/matchers/ItemMatcher.java index c1a02ee0..35c7e268 100644 --- a/app/src/main/java/com/readrops/app/utils/matchers/ItemMatcher.java +++ b/app/src/main/java/com/readrops/app/utils/matchers/ItemMatcher.java @@ -22,7 +22,7 @@ public final class ItemMatcher { for (RSSItem item : items) { Item newItem = new Item(); - newItem.setAuthor(item.getCreator()); + newItem.setAuthor(item.getAuthor()); newItem.setContent(item.getContent()); // Jsoup.clean(item.getContent(), Whitelist.relaxed()) newItem.setDescription(item.getDescription()); newItem.setGuid(item.getGuid() != null ? item.getGuid() : item.getLink()); diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSItem.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSItem.java index 22cd9960..7ef5bcca 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSItem.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSItem.java @@ -15,11 +15,7 @@ public class RSSItem { @Element(name = "link", required = false) private String link; - - @ElementList(name = "link", inline = true, required = false) - @Namespace(prefix = "atom") - private List otherLinks; - + @Element(name = "imageLink", required = false) private String imageLink; @@ -30,9 +26,9 @@ public class RSSItem { @ElementList(name = "enclosure", inline = true, required = false) private List enclosures; - @Element(name = "creator", required = false) + @ElementList(name = "creator", inline = true, required = false) @Namespace(prefix = "dc", reference = "http://purl.org/dc/elements/1.1/") - private String creator; + private List creator; @Element(required = false) private String author; @@ -86,11 +82,11 @@ public class RSSItem { this.imageLink = imageLink; } - public String getCreator() { + public List getCreator() { return creator; } - public void setCreator(String creator) { + public void setCreator(List creator) { this.creator = creator; } @@ -146,8 +142,8 @@ public class RSSItem { } public String getAuthor() { - if (creator != null) - return creator; + if (creator != null && !creator.isEmpty()) + return creator.get(0); else return author; } @@ -155,12 +151,4 @@ public class RSSItem { public void setAuthor(String author) { this.author = author; } - - public List getOtherLinks() { - return otherLinks; - } - - public void setOtherLinks(List otherLinks) { - this.otherLinks = otherLinks; - } }