DbMultiverse - additional languages (#2782)
* DbMultiverse - additional languages * Separate file for "en" class
|
@ -3,9 +3,9 @@ apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
appName = 'Tachiyomi: Dragon Ball Multiverse'
|
appName = 'Tachiyomi: Dragon Ball Multiverse'
|
||||||
pkgNameSuffix = 'en.dragonball_multiverse'
|
pkgNameSuffix = 'all.dragonball_multiverse'
|
||||||
extClass = '.DbMultiverse'
|
extClass = '.DbMFactory'
|
||||||
extVersionCode = 3
|
extVersionCode = 1
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 408 KiB |
|
@ -0,0 +1,83 @@
|
||||||
|
@file:Suppress("ClassName")
|
||||||
|
|
||||||
|
package eu.kanade.tachiyomi.extension.all.dragonball_multiverse
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.source.Source
|
||||||
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
class DbMFactory : SourceFactory {
|
||||||
|
override fun createSources(): List<Source> = listOf(
|
||||||
|
DbMultiverseEN(),
|
||||||
|
DbMultiverseFR(),
|
||||||
|
DbMultiverseJP(),
|
||||||
|
DbMultiverseCN(),
|
||||||
|
DbMultiverseES(),
|
||||||
|
DbMultiverseIT(),
|
||||||
|
DbMultiversePT(),
|
||||||
|
DbMultiverseDE(),
|
||||||
|
DbMultiversePL(),
|
||||||
|
DbMultiverseNL(),
|
||||||
|
DbMultiverseFR_PA(),
|
||||||
|
DbMultiverseTR_TR(),
|
||||||
|
DbMultiversePT_BR(),
|
||||||
|
DbMultiverseHU_HU(),
|
||||||
|
DbMultiverseGA_ES(),
|
||||||
|
DbMultiverseCT_CT(),
|
||||||
|
DbMultiverseNO_NO(),
|
||||||
|
DbMultiverseRU_RU(),
|
||||||
|
DbMultiverseRO_RO(),
|
||||||
|
DbMultiverseEU_EH(),
|
||||||
|
DbMultiverseLT_LT(),
|
||||||
|
DbMultiverseHR_HR(),
|
||||||
|
DbMultiverseKR_KR(),
|
||||||
|
DbMultiverseFI_FI(),
|
||||||
|
DbMultiverseHE_HE(),
|
||||||
|
DbMultiverseBG_BG(),
|
||||||
|
DbMultiverseSV_SE(),
|
||||||
|
DbMultiverseGR_GR(),
|
||||||
|
DbMultiverseES_CO(),
|
||||||
|
DbMultiverseAR_JO(),
|
||||||
|
DbMultiverseTL_PI(),
|
||||||
|
DbMultiverseLA_LA(),
|
||||||
|
DbMultiverseDA_DK(),
|
||||||
|
DbMultiverseCO_FR(),
|
||||||
|
DbMultiverseBR_FR(),
|
||||||
|
DbMultiverseXX_VE()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
class DbMultiverseFR : DbMultiverse("fr")
|
||||||
|
class DbMultiverseJP : DbMultiverse("jp")
|
||||||
|
class DbMultiverseCN : DbMultiverse("cn")
|
||||||
|
class DbMultiverseES : DbMultiverse("es")
|
||||||
|
class DbMultiverseIT : DbMultiverse("it")
|
||||||
|
class DbMultiversePT : DbMultiverse("pt")
|
||||||
|
class DbMultiverseDE : DbMultiverse("de")
|
||||||
|
class DbMultiversePL : DbMultiverse("pl")
|
||||||
|
class DbMultiverseNL : DbMultiverse("nl")
|
||||||
|
class DbMultiverseFR_PA : DbMultiverse("fr-PA")
|
||||||
|
class DbMultiverseTR_TR : DbMultiverse("tr-TR")
|
||||||
|
class DbMultiversePT_BR : DbMultiverse("pt-BR")
|
||||||
|
class DbMultiverseHU_HU : DbMultiverse("hu-HU")
|
||||||
|
class DbMultiverseGA_ES : DbMultiverse("ga-ES")
|
||||||
|
class DbMultiverseCT_CT : DbMultiverse("ct-CT")
|
||||||
|
class DbMultiverseNO_NO : DbMultiverse("no-NO")
|
||||||
|
class DbMultiverseRU_RU : DbMultiverse("ru-RU")
|
||||||
|
class DbMultiverseRO_RO : DbMultiverse("ro-RO")
|
||||||
|
class DbMultiverseEU_EH : DbMultiverse("eu-EH")
|
||||||
|
class DbMultiverseLT_LT : DbMultiverse("lt-LT")
|
||||||
|
class DbMultiverseHR_HR : DbMultiverse("hr-HR")
|
||||||
|
class DbMultiverseKR_KR : DbMultiverse("kr-KR")
|
||||||
|
class DbMultiverseFI_FI : DbMultiverse("fi-FI")
|
||||||
|
class DbMultiverseHE_HE : DbMultiverse("he-HE")
|
||||||
|
class DbMultiverseBG_BG : DbMultiverse("bg-BG")
|
||||||
|
class DbMultiverseSV_SE : DbMultiverse("sv-SE")
|
||||||
|
class DbMultiverseGR_GR : DbMultiverse("gr-GR")
|
||||||
|
class DbMultiverseES_CO : DbMultiverse("es-CO")
|
||||||
|
class DbMultiverseAR_JO : DbMultiverse("ar-JO")
|
||||||
|
class DbMultiverseTL_PI : DbMultiverse("tl-PI")
|
||||||
|
class DbMultiverseLA_LA : DbMultiverse("la-LA")
|
||||||
|
class DbMultiverseDA_DK : DbMultiverse("da-DK")
|
||||||
|
class DbMultiverseCO_FR : DbMultiverse("co-FR")
|
||||||
|
class DbMultiverseBR_FR : DbMultiverse("br-FR")
|
||||||
|
class DbMultiverseXX_VE : DbMultiverse("xx-VE")
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.dragonball_multiverse
|
package eu.kanade.tachiyomi.extension.all.dragonball_multiverse
|
||||||
|
|
||||||
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
|
||||||
|
@ -13,12 +13,11 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
|
||||||
open class DbMultiverse : ParsedHttpSource() {
|
abstract class DbMultiverse(override val lang: String) : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Dragon Ball Multiverse"
|
override val name = "Dragon Ball Multiverse"
|
||||||
override val baseUrl = "https://www.dragonball-multiverse.com"
|
override val baseUrl = "https://www.dragonball-multiverse.com"
|
||||||
override val supportsLatest = false
|
override val supportsLatest = false
|
||||||
override val lang = "en"
|
|
||||||
|
|
||||||
private fun chapterFromElement(element: Element, name: String): SChapter {
|
private fun chapterFromElement(element: Element, name: String): SChapter {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
|
@ -65,7 +64,7 @@ open class DbMultiverse : ParsedHttpSource() {
|
||||||
private fun createManga(document: Document?) = SManga.create().apply {
|
private fun createManga(document: Document?) = SManga.create().apply {
|
||||||
title = name
|
title = name
|
||||||
status = SManga.ONGOING
|
status = SManga.ONGOING
|
||||||
url = "/en/chapters.html"
|
url = "/${lang.replace("-", "_")}/chapters.html"
|
||||||
description = "Dragon Ball Multiverse (DBM) is a free online comic, made by a whole team of fans. It's our personal sequel to DBZ."
|
description = "Dragon Ball Multiverse (DBM) is a free online comic, made by a whole team of fans. It's our personal sequel to DBZ."
|
||||||
thumbnail_url = document?.select("div[ch=\"1\"] img")?.attr("abs:src")
|
thumbnail_url = document?.select("div[ch=\"1\"] img")?.attr("abs:src")
|
||||||
}
|
}
|
||||||
|
@ -82,7 +81,7 @@ open class DbMultiverse : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector(): String? = throw UnsupportedOperationException()
|
override fun popularMangaNextPageSelector(): String? = throw UnsupportedOperationException()
|
||||||
|
|
||||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> = Observable.empty()
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> = Observable.just(MangasPage(emptyList(), false))
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element): SManga = throw UnsupportedOperationException()
|
override fun searchMangaFromElement(element: Element): SManga = throw UnsupportedOperationException()
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
package eu.kanade.tachiyomi.extension.all.dragonball_multiverse
|
||||||
|
|
||||||
|
class DbMultiverseEN : DbMultiverse("en")
|