Fix wrong language code in some extensions. (#7550)
This commit is contained in:
parent
4c73e677ee
commit
aa06cd4b04
|
@ -29,6 +29,9 @@ class LusciousFR : Luscious("Luscious", "https://www.luscious.net", "fr")
|
|||
class LusciousZH : Luscious("Luscious", "https://www.luscious.net", "zh")
|
||||
class LusciousKO : Luscious("Luscious", "https://www.luscious.net", "ko")
|
||||
class LusciousOTHER : Luscious("Luscious", "https://www.luscious.net", "other")
|
||||
class LusciousPT : Luscious("Luscious", "https://www.luscious.net", "pt")
|
||||
class LusciousPT : Luscious("Luscious", "https://www.luscious.net", "pt-BR") {
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 5826725746643311801
|
||||
}
|
||||
class LusciousTH : Luscious("Luscious", "https://www.luscious.net", "th")
|
||||
class LusciousALL : Luscious("Luscious", "https://www.luscious.net", "all")
|
||||
|
|
|
@ -29,6 +29,9 @@ class LusciousAPIFR : Luscious("Luscious (API)", "https://api.luscious.net", "fr
|
|||
class LusciousAPIZH : Luscious("Luscious (API)", "https://api.luscious.net", "zh")
|
||||
class LusciousAPIKO : Luscious("Luscious (API)", "https://api.luscious.net", "ko")
|
||||
class LusciousAPIOTHER : Luscious("Luscious (API)", "https://api.luscious.net", "other")
|
||||
class LusciousAPIPT : Luscious("Luscious (API)", "https://api.luscious.net", "pt")
|
||||
class LusciousAPIPT : Luscious("Luscious (API)", "https://api.luscious.net", "pt-BR") {
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 7982365826055835382
|
||||
}
|
||||
class LusciousAPITH : Luscious("Luscious (API)", "https://api.luscious.net", "th")
|
||||
class LusciousAPIALL : Luscious("Luscious (API)", "https://api.luscious.net", "all")
|
||||
|
|
|
@ -29,6 +29,9 @@ class LusciousMembersFR : Luscious("Luscious (Members)", "https://members.luscio
|
|||
class LusciousMembersZH : Luscious("Luscious (Members)", "https://members.luscious.net", "zh")
|
||||
class LusciousMembersKO : Luscious("Luscious (Members)", "https://members.luscious.net", "ko")
|
||||
class LusciousMembersOTHER : Luscious("Luscious (Members)", "https://members.luscious.net", "other")
|
||||
class LusciousMembersPT : Luscious("Luscious (Members)", "https://members.luscious.net", "pt")
|
||||
class LusciousMembersPT : Luscious("Luscious (Members)", "https://members.luscious.net", "pt-BR") {
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 6917849530594229844
|
||||
}
|
||||
class LusciousMembersTH : Luscious("Luscious (Members)", "https://members.luscious.net", "th")
|
||||
class LusciousMembersALL : Luscious("Luscious (Members)", "https://members.luscious.net", "all")
|
||||
|
|
|
@ -34,16 +34,22 @@ import java.util.Calendar
|
|||
abstract class Luscious(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
override val lang: String ) : ConfigurableSource, HttpSource() {
|
||||
final override val lang: String
|
||||
) : ConfigurableSource, HttpSource() {
|
||||
|
||||
//Based on Luscios single source extension form https://github.com/tachiyomiorg/tachiyomi-extensions/commit/aacf56d0c0ddb173372aac69d798ae998f178377
|
||||
//with modifiaction to make it support multisrc
|
||||
// Based on Luscious single source extension form https://github.com/tachiyomiorg/tachiyomi-extensions/commit/aacf56d0c0ddb173372aac69d798ae998f178377
|
||||
// with modification to make it support multisrc
|
||||
|
||||
override val supportsLatest: Boolean = true
|
||||
|
||||
private val apiBaseUrl: String = "$baseUrl/graphql/nobatch/"
|
||||
|
||||
private val gson = Gson()
|
||||
|
||||
override val client: OkHttpClient = network.cloudflareClient
|
||||
|
||||
private val lusLang: String = toLusLang(lang)
|
||||
|
||||
private fun toLusLang (lang: String): String {
|
||||
return when (lang) {
|
||||
"all" -> FILTER_VALUE_IGNORE
|
||||
|
@ -55,7 +61,7 @@ abstract class Luscious(
|
|||
"fr" -> "6"
|
||||
"zh" -> "8"
|
||||
"ko" -> "9"
|
||||
"pt" -> "100"
|
||||
"pt-BR" -> "100"
|
||||
"th" -> "101"
|
||||
else -> "99"
|
||||
}
|
||||
|
@ -652,7 +658,7 @@ abstract class Luscious(
|
|||
CheckboxFilterOption("Chinese", toLusLang("zh"), false),
|
||||
CheckboxFilterOption("Korean", toLusLang("ko"), false),
|
||||
CheckboxFilterOption("Others", toLusLang("other"), false),
|
||||
CheckboxFilterOption("Portugese", toLusLang("pt"), false),
|
||||
CheckboxFilterOption("Portuguese", toLusLang("pt-BR"), false),
|
||||
CheckboxFilterOption("Thai", toLusLang("th"), false)
|
||||
).filterNot { it.value == lusLang }
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ class LusciousGenerator : ThemeSourceGenerator {
|
|||
|
||||
override val themeClass = "Luscious"
|
||||
|
||||
override val baseVersionCode: Int = 10
|
||||
override val baseVersionCode: Int = 11
|
||||
|
||||
override val sources = listOf(
|
||||
MultiLang("Luscious", "https://www.luscious.net", listOf("en","ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt", "th", "all"), isNsfw = true, className = "LusciousFactory", overrideVersionCode = 2),
|
||||
MultiLang("Luscious (Members)", "https://members.luscious.net", listOf("en","ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt", "th", "all"), isNsfw = true, className = "LusciousMembersFactory", pkgName = "lusciousmembers"),//Requires Account
|
||||
MultiLang("Luscious (API)", "https://api.luscious.net", listOf("en","ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt", "th", "all"), isNsfw = true, className = "LusciousAPIFactory", pkgName = "lusciousapi")
|
||||
MultiLang("Luscious", "https://www.luscious.net", listOf("en", "ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt-BR", "th", "all"), isNsfw = true, className = "LusciousFactory", overrideVersionCode = 2),
|
||||
MultiLang("Luscious (Members)", "https://members.luscious.net", listOf("en", "ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt-BR", "th", "all"), isNsfw = true, className = "LusciousMembersFactory", pkgName = "lusciousmembers"),//Requires Account
|
||||
MultiLang("Luscious (API)", "https://api.luscious.net", listOf("en", "ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt-BR", "th", "all"), isNsfw = true, className = "LusciousAPIFactory", pkgName = "lusciousapi")
|
||||
)
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.source.SourceFactory
|
|||
|
||||
val toISO639 = mapOf(
|
||||
"gb" to "en", // English
|
||||
"br" to "pt-BR", // Brazillian Portugese
|
||||
"br" to "pt-BR", // Brazilian Portuguese
|
||||
"mx" to "es-419", // Latin-American Spanish
|
||||
"vn" to "vi", // Vietnemese
|
||||
"hk" to "zh-Hant", // Traditional Chinese,
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'E-Hentai'
|
||||
pkgNameSuffix = 'all.ehentai'
|
||||
extClass = '.EHFactory'
|
||||
extVersionCode = 13
|
||||
extVersionCode = 14
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -7,22 +7,43 @@ import eu.kanade.tachiyomi.source.SourceFactory
|
|||
@Nsfw
|
||||
class EHFactory : SourceFactory {
|
||||
override fun createSources(): List<Source> = listOf(
|
||||
EHentai("ja", "japanese"),
|
||||
EHentai("en", "english"),
|
||||
EHentai("zh", "chinese"),
|
||||
EHentai("nl", "dutch"),
|
||||
EHentai("fr", "french"),
|
||||
EHentai("de", "german"),
|
||||
EHentai("hu", "hungarian"),
|
||||
EHentai("it", "italian"),
|
||||
EHentai("ko", "korean"),
|
||||
EHentai("pl", "polish"),
|
||||
EHentai("pt", "portuguese"),
|
||||
EHentai("ru", "russian"),
|
||||
EHentai("es", "spanish"),
|
||||
EHentai("th", "thai"),
|
||||
EHentai("vi", "vietnamese"),
|
||||
EHentai("none", "n/a"),
|
||||
EHentai("other", "other")
|
||||
EHentaiJa(),
|
||||
EHentaiEn(),
|
||||
EHentaiZh(),
|
||||
EHentaiNl(),
|
||||
EHentaiFr(),
|
||||
EHentaiDe(),
|
||||
EHentaiHu(),
|
||||
EHentaiIt(),
|
||||
EHentaiKo(),
|
||||
EHentaiPl(),
|
||||
EHentaiPtBr(),
|
||||
EHentaiRu(),
|
||||
EHentaiEs(),
|
||||
EHentaiTh(),
|
||||
EHentaiVi(),
|
||||
EHentaiNone(),
|
||||
EHentaiOther()
|
||||
)
|
||||
}
|
||||
|
||||
class EHentaiJa : EHentai("ja", "japanese")
|
||||
class EHentaiEn : EHentai("en", "english")
|
||||
class EHentaiZh : EHentai("zh", "chinese")
|
||||
class EHentaiNl : EHentai("nl", "dutch")
|
||||
class EHentaiFr : EHentai("fr", "french")
|
||||
class EHentaiDe : EHentai("de", "german")
|
||||
class EHentaiHu : EHentai("hu", "hungarian")
|
||||
class EHentaiIt : EHentai("it", "italian")
|
||||
class EHentaiKo : EHentai("ko", "korean")
|
||||
class EHentaiPl : EHentai("pl", "polish")
|
||||
class EHentaiPtBr : EHentai("pt-BR", "portuguese") {
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 7151438547982231541
|
||||
}
|
||||
class EHentaiRu : EHentai("ru", "russian")
|
||||
class EHentaiEs : EHentai("es", "spanish")
|
||||
class EHentaiTh : EHentai("th", "thai")
|
||||
class EHentaiVi : EHentai("vi", "vietnamese")
|
||||
class EHentaiNone : EHentai("none", "n/a")
|
||||
class EHentaiOther : EHentai("other", "other")
|
||||
|
|
|
@ -33,7 +33,10 @@ import uy.kohesive.injekt.Injekt
|
|||
import uy.kohesive.injekt.api.get
|
||||
import java.net.URLEncoder
|
||||
|
||||
open class EHentai(override val lang: String, private val ehLang: String) : ConfigurableSource, HttpSource() {
|
||||
abstract class EHentai(
|
||||
override val lang: String,
|
||||
private val ehLang: String
|
||||
) : ConfigurableSource, HttpSource() {
|
||||
|
||||
private val preferences: SharedPreferences by lazy {
|
||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'HentaiHand'
|
||||
pkgNameSuffix = 'all.hentaihand'
|
||||
extClass = '.HentaiHandFactory'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ import uy.kohesive.injekt.api.get
|
|||
import java.text.SimpleDateFormat
|
||||
|
||||
@Nsfw
|
||||
class HentaiHand(
|
||||
abstract class HentaiHand(
|
||||
override val lang: String,
|
||||
private val hhLangId: Int? = null,
|
||||
extraName: String = ""
|
||||
|
|
|
@ -9,43 +9,85 @@ class HentaiHandFactory : SourceFactory {
|
|||
|
||||
override fun createSources(): List<Source> = listOf(
|
||||
// https://hentaihand.com/api/languages?per_page=50
|
||||
HentaiHand("other", extraName = " (Unfiltered)"),
|
||||
HentaiHand("en", 1),
|
||||
HentaiHand("zh", 2),
|
||||
HentaiHand("ja", 3),
|
||||
HentaiHand("other", 4, extraName = " (Text Cleaned)"),
|
||||
HentaiHand("eo", 5),
|
||||
HentaiHand("ceb", 6),
|
||||
HentaiHand("cs", 7),
|
||||
HentaiHand("ar", 8),
|
||||
HentaiHand("sk", 9),
|
||||
HentaiHand("mn", 10),
|
||||
HentaiHand("uk", 11),
|
||||
HentaiHand("la", 12),
|
||||
HentaiHand("tl", 13),
|
||||
HentaiHand("es", 14),
|
||||
HentaiHand("it", 15),
|
||||
HentaiHand("ko", 16),
|
||||
HentaiHand("th", 17),
|
||||
HentaiHand("pl", 18),
|
||||
HentaiHand("fr", 19),
|
||||
HentaiHand("pt", 20),
|
||||
HentaiHand("de", 21),
|
||||
HentaiHand("fi", 22),
|
||||
HentaiHand("ru", 23),
|
||||
HentaiHand("sv", 24),
|
||||
HentaiHand("hu", 25),
|
||||
HentaiHand("id", 26),
|
||||
HentaiHand("vi", 27),
|
||||
HentaiHand("da", 28),
|
||||
HentaiHand("ro", 29),
|
||||
HentaiHand("et", 30),
|
||||
HentaiHand("nl", 31),
|
||||
HentaiHand("ca", 32),
|
||||
HentaiHand("tr", 33),
|
||||
HentaiHand("el", 34),
|
||||
HentaiHand("no", 35),
|
||||
HentaiHand("sq", 1501),
|
||||
HentaiHand("bg", 1502),
|
||||
HentaiHandOther(),
|
||||
HentaiHandEn(),
|
||||
HentaiHandZh(),
|
||||
HentaiHandJa(),
|
||||
HentaiHandNoText(),
|
||||
HentaiHandEo(),
|
||||
HentaiHandCeb(),
|
||||
HentaiHandCs(),
|
||||
HentaiHandAr(),
|
||||
HentaiHandSk(),
|
||||
HentaiHandMn(),
|
||||
HentaiHandUk(),
|
||||
HentaiHandLa(),
|
||||
HentaiHandTl(),
|
||||
HentaiHandEs(),
|
||||
HentaiHandIt(),
|
||||
HentaiHandKo(),
|
||||
HentaiHandTh(),
|
||||
HentaiHandPl(),
|
||||
HentaiHandFr(),
|
||||
HentaiHandPtBr(),
|
||||
HentaiHandDe(),
|
||||
HentaiHandFi(),
|
||||
HentaiHandRu(),
|
||||
HentaiHandSv(),
|
||||
HentaiHandHu(),
|
||||
HentaiHandId(),
|
||||
HentaiHandVi(),
|
||||
HentaiHandDa(),
|
||||
HentaiHandRo(),
|
||||
HentaiHandEt(),
|
||||
HentaiHandNl(),
|
||||
HentaiHandCa(),
|
||||
HentaiHandTr(),
|
||||
HentaiHandEl(),
|
||||
HentaiHandNo(),
|
||||
HentaiHandSq(),
|
||||
HentaiHandBg(),
|
||||
)
|
||||
}
|
||||
|
||||
class HentaiHandOther : HentaiHand("other", extraName = " (Unfiltered)")
|
||||
class HentaiHandEn : HentaiHand("en", 1)
|
||||
class HentaiHandZh : HentaiHand("zh", 2)
|
||||
class HentaiHandJa : HentaiHand("ja", 3)
|
||||
class HentaiHandNoText : HentaiHand("other", 4, extraName = " (Text Cleaned)")
|
||||
class HentaiHandEo : HentaiHand("eo", 5)
|
||||
class HentaiHandCeb : HentaiHand("ceb", 6)
|
||||
class HentaiHandCs : HentaiHand("cs", 7)
|
||||
class HentaiHandAr : HentaiHand("ar", 8)
|
||||
class HentaiHandSk : HentaiHand("sk", 9)
|
||||
class HentaiHandMn : HentaiHand("mn", 10)
|
||||
class HentaiHandUk : HentaiHand("uk", 11)
|
||||
class HentaiHandLa : HentaiHand("la", 12)
|
||||
class HentaiHandTl : HentaiHand("tl", 13)
|
||||
class HentaiHandEs : HentaiHand("es", 14)
|
||||
class HentaiHandIt : HentaiHand("it", 15)
|
||||
class HentaiHandKo : HentaiHand("ko", 16)
|
||||
class HentaiHandTh : HentaiHand("th", 17)
|
||||
class HentaiHandPl : HentaiHand("pl", 18)
|
||||
class HentaiHandFr : HentaiHand("fr", 19)
|
||||
class HentaiHandPtBr : HentaiHand("pt-BR", 20) {
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 2516244587139644000
|
||||
}
|
||||
class HentaiHandDe : HentaiHand("de", 21)
|
||||
class HentaiHandFi : HentaiHand("fi", 22)
|
||||
class HentaiHandRu : HentaiHand("ru", 23)
|
||||
class HentaiHandSv : HentaiHand("sv", 24)
|
||||
class HentaiHandHu : HentaiHand("hu", 25)
|
||||
class HentaiHandId : HentaiHand("id", 26)
|
||||
class HentaiHandVi : HentaiHand("vi", 27)
|
||||
class HentaiHandDa : HentaiHand("da", 28)
|
||||
class HentaiHandRo : HentaiHand("ro", 29)
|
||||
class HentaiHandEt : HentaiHand("et", 30)
|
||||
class HentaiHandNl : HentaiHand("nl", 31)
|
||||
class HentaiHandCa : HentaiHand("ca", 32)
|
||||
class HentaiHandTr : HentaiHand("tr", 33)
|
||||
class HentaiHandEl : HentaiHand("el", 34)
|
||||
class HentaiHandNo : HentaiHand("no", 35)
|
||||
class HentaiHandSq : HentaiHand("sq", 1501)
|
||||
class HentaiHandBg : HentaiHand("bg", 1502)
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Mangatoon (Limited)'
|
||||
pkgNameSuffix = 'all.mangatoon'
|
||||
extClass = '.MangaToonFactory'
|
||||
extVersionCode = 1
|
||||
extVersionCode = 2
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ class MangaToonFactory : SourceFactory {
|
|||
class ID : MangaToon("id", "id")
|
||||
class VI : MangaToon("vi", "vi")
|
||||
class ES : MangaToon("es", "es")
|
||||
class PT : MangaToon("pt", "pt")
|
||||
class PT : MangaToon("pt-BR", "pt") {
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 2064722193112934135
|
||||
}
|
||||
class TH : MangaToon("th", "th")
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'NineManga'
|
||||
pkgNameSuffix = "all.ninemanga"
|
||||
extClass = '.NineMangaFactory'
|
||||
extVersionCode = 13
|
||||
extVersionCode = 14
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,11 @@ import java.text.SimpleDateFormat
|
|||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
|
||||
open class NineManga(override val name: String, override val baseUrl: String, override val lang: String) : ParsedHttpSource() {
|
||||
open class NineManga(
|
||||
override val name: String,
|
||||
override val baseUrl: String,
|
||||
override val lang: String
|
||||
) : ParsedHttpSource() {
|
||||
|
||||
override val supportsLatest: Boolean = true
|
||||
|
||||
|
|
|
@ -182,7 +182,11 @@ class NineMangaEs : NineManga("NineMangaEs", "https://es.ninemanga.com", "es") {
|
|||
)
|
||||
}
|
||||
|
||||
class NineMangaBr : NineManga("NineMangaBr", "https://br.ninemanga.com", "pt") {
|
||||
class NineMangaBr : NineManga("NineMangaBr", "https://br.ninemanga.com", "pt-BR") {
|
||||
|
||||
// Hardcode the id because the language wasn't specific.
|
||||
override val id: Long = 7162569729467394726
|
||||
|
||||
override fun parseStatus(status: String) = when {
|
||||
status.contains("Em tradução") -> SManga.ONGOING
|
||||
status.contains("Completo") -> SManga.COMPLETED
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Simply Hentai'
|
||||
pkgNameSuffix = 'all.simplyhentai'
|
||||
extClass = '.SimplyHentaiFactory'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ abstract class SimplyHentai(
|
|||
) : ParsedHttpSource() {
|
||||
override val name = "Simply Hentai"
|
||||
|
||||
override val baseUrl = "https://www.simply-hentai.com"
|
||||
override val baseUrl = "https://old.simply-hentai.com"
|
||||
|
||||
override val supportsLatest = true
|
||||
|
||||
|
|
|
@ -27,4 +27,8 @@ class SimplyHentaiES : SimplyHentai("es", "spanish", "8")
|
|||
class SimplyHentaiRU : SimplyHentai("ru", "russian", "7")
|
||||
class SimplyHentaiFR : SimplyHentai("fr", "french", "3")
|
||||
class SimplyHentaiDE : SimplyHentai("de", "german", "4")
|
||||
class SimplyHentaiPT : SimplyHentai("pt", "portuguese", "6")
|
||||
class SimplyHentaiPT : SimplyHentai("pt-BR", "portuguese", "6") {
|
||||
// The site uses a Portugal flag for the language,
|
||||
// but the contents are in Brazilian Portuguese.
|
||||
override val id: Long = 7265793330155215502
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue