diff --git a/api/src/main/java/com/readrops/api/localfeed/atom/ATOMFeedAdapter.kt b/api/src/main/java/com/readrops/api/localfeed/atom/ATOMFeedAdapter.kt index e53a4bf2..43446073 100644 --- a/api/src/main/java/com/readrops/api/localfeed/atom/ATOMFeedAdapter.kt +++ b/api/src/main/java/com/readrops/api/localfeed/atom/ATOMFeedAdapter.kt @@ -38,7 +38,7 @@ class ATOMFeedAdapter : XmlAdapter { } private fun parseLink(konsume: Konsumer, feed: Feed) { - val rel = konsume.attributes["rel"] + val rel = konsume.attributes.getValueOpt("rel") if (rel == "self") feed.url = konsume.attributes["href"] diff --git a/api/src/main/java/com/readrops/api/localfeed/atom/ATOMItemsAdapter.kt b/api/src/main/java/com/readrops/api/localfeed/atom/ATOMItemsAdapter.kt index db7fe178..3d2ccf8f 100644 --- a/api/src/main/java/com/readrops/api/localfeed/atom/ATOMItemsAdapter.kt +++ b/api/src/main/java/com/readrops/api/localfeed/atom/ATOMItemsAdapter.kt @@ -26,7 +26,11 @@ class ATOMItemsAdapter : XmlAdapter> { "title" -> title = nonNullText() "id" -> guid = nullableText() "updated" -> pubDate = DateUtils.stringToLocalDateTime(nonNullText()) - "link" -> if (attributes["rel"] == "alternate") link = attributes["href"] + "link" -> { + if (attributes.getValueOpt("rel") == null || + attributes["rel"] == "alternate") + link = attributes["href"] + } "author" -> allChildrenAutoIgnore("name") { author = text() } "summary" -> description = nullableText() "content" -> content = nullableText()