|
|
|
@ -4,6 +4,7 @@ import com.koushikdutta.quack.QuackContext
|
|
|
|
import okhttp3.OkHttpClient
|
|
|
|
import okhttp3.OkHttpClient
|
|
|
|
import okhttp3.Request
|
|
|
|
import okhttp3.Request
|
|
|
|
import okhttp3.Response
|
|
|
|
import okhttp3.Response
|
|
|
|
|
|
|
|
import org.koitharu.kotatsu.parsers.bitmap.Bitmap
|
|
|
|
import org.koitharu.kotatsu.parsers.config.MangaSourceConfig
|
|
|
|
import org.koitharu.kotatsu.parsers.config.MangaSourceConfig
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
|
|
|
import org.koitharu.kotatsu.parsers.network.UserAgents
|
|
|
|
import org.koitharu.kotatsu.parsers.network.UserAgents
|
|
|
|
@ -45,6 +46,14 @@ internal object MangaLoaderContextMock : MangaLoaderContext() {
|
|
|
|
|
|
|
|
|
|
|
|
override fun getDefaultUserAgent(): String = UserAgents.FIREFOX_MOBILE
|
|
|
|
override fun getDefaultUserAgent(): String = UserAgents.FIREFOX_MOBILE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun redrawImageResponse(response: Response, redraw: (image: Bitmap) -> Bitmap): Response {
|
|
|
|
|
|
|
|
return response
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun createBitmap(width: Int, height: Int): Bitmap {
|
|
|
|
|
|
|
|
throw UnsupportedOperationException()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
suspend fun doRequest(url: String, source: MangaSource?): Response {
|
|
|
|
suspend fun doRequest(url: String, source: MangaSource?): Response {
|
|
|
|
val request = Request.Builder()
|
|
|
|
val request = Request.Builder()
|
|
|
|
.get()
|
|
|
|
.get()
|
|
|
|
|