From 772bef05fce217724c3be68b5c762dd9658a8f0e Mon Sep 17 00:00:00 2001 From: len Date: Mon, 30 Jan 2017 21:04:56 +0100 Subject: [PATCH] Fix #661 --- app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index b46190c55..93b59f454 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -156,9 +156,9 @@ class LocalSource(private val context: Context) : CatalogueSource { if (thumbnail_url == null) { val chapters = fetchChapterList(this).toBlocking().first() if (chapters.isNotEmpty()) { - val url = fetchPageList(chapters.last()).toBlocking().first().firstOrNull()?.url - if (url != null) { - val input = context.contentResolver.openInputStream(Uri.parse(url)) + val uri = fetchPageList(chapters.last()).toBlocking().first().firstOrNull()?.uri + if (uri != null) { + val input = context.contentResolver.openInputStream(uri) try { val dest = updateCover(context, this, input) thumbnail_url = dest?.absolutePath