Fix for thumbnails loading (#4467)
* Fix for thumbnails loading * Increment Version Co-authored-by: DF-Aces <johanbaker98gmail.com>
This commit is contained in:
parent
6c66a78a8c
commit
ab9c57882b
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Japscan'
|
extName = 'Japscan'
|
||||||
pkgNameSuffix = 'fr.japscan'
|
pkgNameSuffix = 'fr.japscan'
|
||||||
extClass = '.Japscan'
|
extClass = '.Japscan'
|
||||||
extVersionCode = 22
|
extVersionCode = 23
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package eu.kanade.tachiyomi.extension.fr.japscan
|
package eu.kanade.tachiyomi.extension.fr.japscan
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import android.annotation.TargetApi
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
import android.os.Build
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.support.v7.preference.ListPreference
|
import android.support.v7.preference.ListPreference
|
||||||
|
@ -187,12 +189,7 @@ class Japscan : ConfigurableSource, ParsedHttpSource() {
|
||||||
element.select("a").first().let {
|
element.select("a").first().let {
|
||||||
manga.setUrlWithoutDomain(it.attr("href"))
|
manga.setUrlWithoutDomain(it.attr("href"))
|
||||||
manga.title = it.text()
|
manga.title = it.text()
|
||||||
|
manga.thumbnail_url = "$baseUrl/imgs/${it.attr("href").replace(Regex("/$"),".jpg")}".toLowerCase(Locale.ROOT)
|
||||||
val s = StringUtils.stripAccents(it.text())
|
|
||||||
.replace("[\\W]".toRegex(), "-")
|
|
||||||
.replace("[-]{2,}".toRegex(), "-")
|
|
||||||
.replace("^-|-$".toRegex(), "")
|
|
||||||
manga.thumbnail_url = "$baseUrl/imgs/mangas/$s.jpg".toLowerCase(Locale.ROOT)
|
|
||||||
}
|
}
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
@ -357,6 +354,7 @@ class Japscan : ConfigurableSource, ParsedHttpSource() {
|
||||||
webview.settings.javaScriptEnabled = true
|
webview.settings.javaScriptEnabled = true
|
||||||
webview.settings.domStorageEnabled = true
|
webview.settings.domStorageEnabled = true
|
||||||
webview.webViewClient = object : WebViewClient() {
|
webview.webViewClient = object : WebViewClient() {
|
||||||
|
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||||
override fun shouldInterceptRequest(
|
override fun shouldInterceptRequest(
|
||||||
view: WebView,
|
view: WebView,
|
||||||
request: WebResourceRequest
|
request: WebResourceRequest
|
||||||
|
|
Loading…
Reference in New Issue