Fix wrong language in multisrc MangasProject (#6463)

* Fix wrong language in multisrc MangasProject.

* Fix lib-ratelimit import error and add custom icons.
This commit is contained in:
Alessandro Jean 2021-04-07 14:11:46 -03:00 committed by GitHub
parent 3975047cb4
commit 77e8ad7e7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 16 additions and 27 deletions

View File

@ -0,0 +1,4 @@
dependencies {
implementation project(':lib-ratelimit')
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -1,26 +1,22 @@
package eu.kanade.tachiyomi.extension.pt.leitornet package eu.kanade.tachiyomi.extension.pt.leitornet
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.mangasproject.MangasProject import eu.kanade.tachiyomi.multisrc.mangasproject.MangasProject
import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SChapter
import okhttp3.Request import okhttp3.Request
import okhttp3.Response import okhttp3.Response
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
class LeitorNet : MangasProject("Leitor.net", "https://leitor.net", "pt-br") { class LeitorNet : MangasProject("Leitor.net", "https://leitor.net", "pt-BR") {
// Use the old generated id when the source did have the name "mangásPROJECT" and // Use the old generated id when the source did have the name "mangásPROJECT" and
// did have mangas in their catalogue. Now they "only have webtoons" and // did have mangas in their catalogue. Now they "only have webtoons" and
// became a different website, but they still use the same structure. // became a different website, but they still use the same structure.
// Existing mangas and other titles in the library still work. // Existing mangas and other titles in the library still work.
override val id: Long = 2225174659569980836 override val id: Long = 2225174659569980836
override val client: OkHttpClient = network.cloudflareClient.newBuilder() override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS)) .addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS))
.connectTimeout(1, TimeUnit.MINUTES) .connectTimeout(1, TimeUnit.MINUTES)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -1,25 +1,21 @@
package eu.kanade.tachiyomi.extension.pt.mangalivre package eu.kanade.tachiyomi.extension.pt.mangalivre
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.mangasproject.MangasProject import eu.kanade.tachiyomi.multisrc.mangasproject.MangasProject
import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.SChapter
import okhttp3.Request import okhttp3.Request
import okhttp3.Response import okhttp3.Response
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
class MangaLivre : MangasProject("Mangá Livre", "https://mangalivre.net", "pt-br") { class MangaLivre : MangasProject("Mangá Livre", "https://mangalivre.net", "pt-BR") {
// Hardcode the id because the language wasn't specific. // Hardcode the id because the language wasn't specific.
override val id: Long = 4762777556012432014 override val id: Long = 4762777556012432014
override val client: OkHttpClient = network.cloudflareClient.newBuilder() override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS)) .addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS))
.connectTimeout(1, TimeUnit.MINUTES) .connectTimeout(1, TimeUnit.MINUTES)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -1,18 +1,13 @@
package eu.kanade.tachiyomi.extension.pt.toonei package eu.kanade.tachiyomi.extension.pt.toonei
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.mangasproject.MangasProject import eu.kanade.tachiyomi.multisrc.mangasproject.MangasProject
import org.jsoup.nodes.Document import org.jsoup.nodes.Document
import okhttp3.Request
import okhttp3.Response
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
class Toonei : MangasProject("Toonei", "https://toonei.com", "pt-br") { class Toonei : MangasProject("Toonei", "https://toonei.com", "pt-BR") {
override val client: OkHttpClient = network.cloudflareClient.newBuilder() override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS)) .addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS))
.connectTimeout(1, TimeUnit.MINUTES) .connectTimeout(1, TimeUnit.MINUTES)

View File

@ -34,12 +34,10 @@ abstract class MangasProject(
override val lang: String override val lang: String
) : HttpSource() { ) : HttpSource() {
override val supportsLatest = true override val supportsLatest = true
// Sometimes the site is slow. // Sometimes the site is slow.
override val client: OkHttpClient = network.cloudflareClient.newBuilder() override val client: OkHttpClient = network.cloudflareClient.newBuilder()
//.addInterceptor(RateLimitInterceptor(5, 1, TimeUnit.SECONDS))
.connectTimeout(1, TimeUnit.MINUTES) .connectTimeout(1, TimeUnit.MINUTES)
.readTimeout(1, TimeUnit.MINUTES) .readTimeout(1, TimeUnit.MINUTES)
.writeTimeout(1, TimeUnit.MINUTES) .writeTimeout(1, TimeUnit.MINUTES)

View File

@ -12,9 +12,9 @@ class MangasProjectGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 1 override val baseVersionCode: Int = 1
override val sources = listOf( override val sources = listOf(
SingleLang("Leitor.net", "https://leitor.net", "pt-br", className = "LeitorNet"), SingleLang("Leitor.net", "https://leitor.net", "pt-BR", className = "LeitorNet", isNsfw = true, overrideVersionCode = 1),
SingleLang("Mangá Livre", "https://mangalivre.net", "pt-br", className = "MangaLivre", isNsfw = true), SingleLang("Mangá Livre", "https://mangalivre.net", "pt-BR", className = "MangaLivre", isNsfw = true, overrideVersionCode = 1),
SingleLang("Toonei", "https://toonei.com", "pt-br"), SingleLang("Toonei", "https://toonei.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
) )
companion object { companion object {