diff --git a/src/en/snowmtl/build.gradle b/src/en/snowmtl/build.gradle index 9cebf299c..31905f7a7 100644 --- a/src/en/snowmtl/build.gradle +++ b/src/en/snowmtl/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Snow Machine Translations' extClass = '.Snowmtl' - extVersionCode = 1 + extVersionCode = 2 isNsfw = true } diff --git a/src/en/snowmtl/src/eu/kanade/tachiyomi/extension/en/snowmtl/ComposedImageInterceptor.kt b/src/en/snowmtl/src/eu/kanade/tachiyomi/extension/en/snowmtl/ComposedImageInterceptor.kt index b5113c27c..76ae000cf 100644 --- a/src/en/snowmtl/src/eu/kanade/tachiyomi/extension/en/snowmtl/ComposedImageInterceptor.kt +++ b/src/en/snowmtl/src/eu/kanade/tachiyomi/extension/en/snowmtl/ComposedImageInterceptor.kt @@ -48,7 +48,7 @@ class ComposedImageInterceptor( val request = chain.request() val url = request.url.toString() - val isPageImageUrl = url.contains("storage.${baseUrl.substringAfterLast("/")}", true) + val isPageImageUrl = url.contains("${baseUrl.substringAfterLast("/")}/storage/", true) if (isPageImageUrl.not()) { return chain.proceed(request) } @@ -84,7 +84,10 @@ class ComposedImageInterceptor( val output = ByteArrayOutputStream() - val format = when (url.substringAfterLast(".").lowercase()) { + val ext = url.substringBefore("#") + .substringAfterLast(".") + .lowercase() + val format = when (ext) { "png" -> Bitmap.CompressFormat.PNG "jpeg", "jpg" -> Bitmap.CompressFormat.JPEG else -> Bitmap.CompressFormat.WEBP