From 20264eecb9c0e583b8ffc10f9437e8b3797bb0f1 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Wed, 28 Jul 2021 20:25:35 +0800 Subject: [PATCH] fix regression in cover fetching (#5621) introduced in https://github.com/tachiyomiorg/tachiyomi/pull/4870 this was previously done here: https://github.com/tachiyomiorg/tachiyomi/blob/7d23fd8ef5bbb9efd12f65bb5c9670464dd6c0b1/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaThumbnailModelLoader.kt#L95 as part of https://github.com/tachiyomiorg/tachiyomi/pull/2908 this impacts Komga extension, where server url is manually provided by the user, but due to auto-correct on mobile keyboards the `http` prefix sometimes get capitalized to `Http`. --- .../java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt index 5c5e09708c..69f2c26aa9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt @@ -148,7 +148,7 @@ class MangaCoverFetcher : Fetcher { private fun getResourceType(cover: String?): Type? { return when { cover.isNullOrEmpty() -> null - cover.startsWith("http") || cover.startsWith("Custom-", true) -> Type.URL + cover.startsWith("http", true) || cover.startsWith("Custom-", true) -> Type.URL cover.startsWith("/") || cover.startsWith("file://") -> Type.File else -> null }