mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-05 08:38:56 +01:00
Extract user agent string from WebView
This commit is contained in:
@@ -10,6 +10,7 @@ import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.util.system.WebViewUtil
|
||||
import okhttp3.Headers
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
@@ -74,7 +75,7 @@ abstract class HttpSource : CatalogueSource {
|
||||
* Headers builder for requests. Implementations can override this method for custom headers.
|
||||
*/
|
||||
protected open fun headersBuilder() = Headers.Builder().apply {
|
||||
add("User-Agent", DEFAULT_USERAGENT)
|
||||
add("User-Agent", WebViewUtil.DEFAULT_USER_AGENT)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -369,8 +370,4 @@ abstract class HttpSource : CatalogueSource {
|
||||
* Returns the list of filters for the source.
|
||||
*/
|
||||
override fun getFilterList() = FilterList()
|
||||
|
||||
companion object {
|
||||
const val DEFAULT_USERAGENT = "Mozilla/5.0 (Windows NT 6.3; WOW64)"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user