diff --git a/app/src/main/java/io/legado/app/help/glide/ImageLoader.kt b/app/src/main/java/io/legado/app/help/glide/ImageLoader.kt index ea4163da4..b60131995 100644 --- a/app/src/main/java/io/legado/app/help/glide/ImageLoader.kt +++ b/app/src/main/java/io/legado/app/help/glide/ImageLoader.kt @@ -28,7 +28,9 @@ object ImageLoader { } path.isAbsUrl() -> { kotlin.runCatching { - val source = sourceOrigin?.let { appDb.bookSourceDao.getBookSource(it) } + val source = sourceOrigin?.let { + appDb.bookSourceDao.getBookSource(it) ?: appDb.rssSourceDao.getByKey(it) + } val url = AnalyzeUrl(path, source = source).getGlideUrl() GlideApp.with(context).load(url) }.getOrDefault( diff --git a/app/src/main/java/io/legado/app/ui/main/rss/RssAdapter.kt b/app/src/main/java/io/legado/app/ui/main/rss/RssAdapter.kt index b3df28b0d..0fa56a4a4 100644 --- a/app/src/main/java/io/legado/app/ui/main/rss/RssAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/main/rss/RssAdapter.kt @@ -27,7 +27,7 @@ class RssAdapter(context: Context, val callBack: CallBack) : ) { binding.apply { tvName.text = item.sourceName - ImageLoader.load(context, item.sourceIcon) + ImageLoader.load(context, item.sourceIcon, item.sourceUrl) .centerCrop() .placeholder(R.drawable.image_rss) .error(R.drawable.image_rss) diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt index b2d14e9f1..85c39d029 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter.kt @@ -38,7 +38,7 @@ class RssArticlesAdapter(context: Context, callBack: CallBack) : if (item.image.isNullOrBlank() && !callBack.isGridLayout) { imageView.gone() } else { - ImageLoader.load(context, item.image).apply { + ImageLoader.load(context, item.image, item.origin).apply { if (callBack.isGridLayout) { placeholder(R.drawable.image_rss_article) } else { diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter1.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter1.kt index d92fb4b94..40a53984d 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter1.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter1.kt @@ -36,7 +36,7 @@ class RssArticlesAdapter1(context: Context, callBack: CallBack) : if (item.image.isNullOrBlank() && !callBack.isGridLayout) { imageView.gone() } else { - ImageLoader.load(context, item.image).apply { + ImageLoader.load(context, item.image, item.origin).apply { if (callBack.isGridLayout) { placeholder(R.drawable.image_rss_article) } else { diff --git a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter2.kt b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter2.kt index 5a512a063..99f892bda 100644 --- a/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter2.kt +++ b/app/src/main/java/io/legado/app/ui/rss/article/RssArticlesAdapter2.kt @@ -36,7 +36,7 @@ class RssArticlesAdapter2(context: Context, callBack: CallBack) : if (item.image.isNullOrBlank() && !callBack.isGridLayout) { imageView.gone() } else { - ImageLoader.load(context, item.image).apply { + ImageLoader.load(context, item.image, item.origin).apply { if (callBack.isGridLayout) { placeholder(R.drawable.image_rss_article) } else { diff --git a/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesAdapter.kt b/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesAdapter.kt index ba0a252c2..25cde23c0 100644 --- a/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/rss/favorites/RssFavoritesAdapter.kt @@ -35,7 +35,7 @@ class RssFavoritesAdapter(context: Context, val callBack: CallBack) : if (item.image.isNullOrBlank()) { imageView.gone() } else { - ImageLoader.load(context, item.image) + ImageLoader.load(context, item.image, item.origin) .addListener(object : RequestListener { override fun onLoadFailed( e: GlideException?,