diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java index d8da86e3..df61230a 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/RSSNetwork.java @@ -8,6 +8,7 @@ import com.readrops.readropslibrary.Utils.Utils; import com.readrops.readropslibrary.localfeed.atom.ATOMFeed; import com.readrops.readropslibrary.localfeed.json.JSONFeed; import com.readrops.readropslibrary.localfeed.rss.RSSFeed; +import com.readrops.readropslibrary.localfeed.rss.RSSLink; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.core.Persister; @@ -75,6 +76,9 @@ public class RSSNetwork { switch (type) { case RSS_2: RSSFeed rssFeed = serializer.read(RSSFeed.class, xml); + if (rssFeed.getChannel().getFeedUrl() == null) // workaround si the channel does not have any atom:link tag + rssFeed.getChannel().getLinks().add(new RSSLink(null, url)); + callback.onSyncSuccess(rssFeed, type); break; case RSS_ATOM: diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSLink.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSLink.java index e680aa2c..caf16fd1 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSLink.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/localfeed/rss/RSSLink.java @@ -14,6 +14,15 @@ public class RSSLink { @Attribute(name = "href", required = false) private String href; + public RSSLink() { + + } + + public RSSLink(String text, String href) { + this.text = text; + this.href = href; + } + public String getHref() { return href; }