mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 09:01:49 +01:00
fix regression in cover fetching (#5621)
introduced in https://github.com/tachiyomiorg/tachiyomi/pull/4870
this was previously done here: 7d23fd8ef5/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`.
This commit is contained in:
parent
cc55453076
commit
20264eecb9
@ -148,7 +148,7 @@ class MangaCoverFetcher : Fetcher<Manga> {
|
|||||||
private fun getResourceType(cover: String?): Type? {
|
private fun getResourceType(cover: String?): Type? {
|
||||||
return when {
|
return when {
|
||||||
cover.isNullOrEmpty() -> null
|
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
|
cover.startsWith("/") || cover.startsWith("file://") -> Type.File
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user