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 af91ace8..3f2d63ae 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 @@ -29,6 +29,7 @@ class ATOMFeedAdapter : XmlAdapter>> { "link" -> parseLink(this@allChildrenAutoIgnore, feed) "subtitle" -> description = nullableText() "entry" -> items += itemAdapter.fromXml(this@allChildrenAutoIgnore) + else -> skipContents() } } } diff --git a/api/src/main/java/com/readrops/api/localfeed/rss1/RSS1FeedAdapter.kt b/api/src/main/java/com/readrops/api/localfeed/rss1/RSS1FeedAdapter.kt index 31cf3546..ef0beff7 100644 --- a/api/src/main/java/com/readrops/api/localfeed/rss1/RSS1FeedAdapter.kt +++ b/api/src/main/java/com/readrops/api/localfeed/rss1/RSS1FeedAdapter.kt @@ -26,6 +26,7 @@ class RSS1FeedAdapter : XmlAdapter>> { when (tagName) { "channel" -> parseChannel(this, feed) "item" -> items += itemAdapter.fromXml(this) + else -> skipContents() } } } diff --git a/appcompose/src/main/java/com/readrops/app/compose/repositories/LocalRSSRepository.kt b/appcompose/src/main/java/com/readrops/app/compose/repositories/LocalRSSRepository.kt index ff0e622e..c4852763 100644 --- a/appcompose/src/main/java/com/readrops/app/compose/repositories/LocalRSSRepository.kt +++ b/appcompose/src/main/java/com/readrops/app/compose/repositories/LocalRSSRepository.kt @@ -1,5 +1,6 @@ package com.readrops.app.compose.repositories +import android.util.Log import com.readrops.api.localfeed.LocalRSSDataSource import com.readrops.api.services.SyncResult import com.readrops.api.utils.ApiUtils @@ -123,8 +124,12 @@ class LocalRSSRepository( etag = null lastModified = null - iconUrl = HtmlParser.getFaviconLink(siteUrl!!, get()).also { feedUrl -> - feedUrl?.let { backgroundColor = FeedColors.getFeedColor(it) } + try { + iconUrl = HtmlParser.getFaviconLink(siteUrl!!, get()).also { feedUrl -> + feedUrl?.let { backgroundColor = FeedColors.getFeedColor(it) } + } + } catch (e: Exception) { + Log.d("LocalRSSRepository", "insertFeed: ${e.message}") } id = database.newFeedDao().insert(this).toInt()