Update MangaLivre url. (#2217)

Update MangaLivre url
This commit is contained in:
Alessandro Jean 2020-02-08 22:14:43 -03:00 committed by GitHub
parent 44f10867c7
commit 7a10f58bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 12 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: mangásPROJECT'
pkgNameSuffix = 'pt.mangasproject'
extClass = '.MangasProjectFactory'
extVersionCode = 6
extVersionCode = 7
libVersion = '1.2'
}

View File

@ -26,10 +26,8 @@ abstract class MangasProject(override val name: String,
override val supportsLatest = true
private val correctClient = network.cloudflareClient
// Sometimes the site is slow.
override val client = correctClient.newBuilder()
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.connectTimeout(1, TimeUnit.MINUTES)
.readTimeout(1, TimeUnit.MINUTES)
.writeTimeout(1, TimeUnit.MINUTES)
@ -301,7 +299,7 @@ abstract class MangasProject(override val name: String,
private fun Response.asJsonObject(): JsonObject = JSON_PARSER.parse(body()!!.string()).obj
companion object {
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36"
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36"
private val TOKEN_REGEX = "token=(.*)&id".toRegex()

View File

@ -4,13 +4,11 @@ import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.SourceFactory
class MangasProjectFactory : SourceFactory {
override fun createSources(): List<Source> = getAllSources()
override fun createSources(): List<Source> = listOf(
MangasProjectOriginal(),
MangaLivre()
)
}
class MangasProjectOriginal : MangasProject("mangásPROJECT", "https://leitor.net")
class MangaLivre : MangasProject("MangaLivre", "https://mangalivre.com")
fun getAllSources(): List<Source> = listOf(
MangasProjectOriginal(),
MangaLivre()
)
class MangaLivre : MangasProject("MangaLivre", "https://mangalivre.net")