Small fix for webtoons backward compabilty (#6460)

* Update WebtoonsGenerator.kt

* Update WebtoonsFactory.kt
This commit is contained in:
Johannes Joens 2021-04-08 03:19:34 +12:00 committed by GitHub
parent e97c7bc8ab
commit 506f6555c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -19,8 +19,8 @@ class WebtoonsFactory : SourceFactory {
)
}
class WebtoonsEN : Webtoons("Webtoons", "https://www.webtoons.com", "en")
class WebtoonsID : Webtoons("Webtoons", "https://www.webtoons.com", "id") {
class WebtoonsEN : Webtoons("Webtoons.com", "https://www.webtoons.com", "en")
class WebtoonsID : Webtoons("Webtoons.com", "https://www.webtoons.com", "id") {
// Override ID as part of the name was removed to be more consiten with other enteries
override val id: Long = 8749627068478740298
@ -37,8 +37,8 @@ class WebtoonsID : Webtoons("Webtoons", "https://www.webtoons.com", "id") {
return GregorianCalendar(year.toInt(), monthIndex, day.toInt()).time.time
}
}
class WebtoonsTH : Webtoons("Webtoons", "https://www.webtoons.com", "th", dateFormat = SimpleDateFormat("d MMM yyyy", Locale("th")))
class WebtoonsES : Webtoons("Webtoons", "https://www.webtoons.com", "es") {
class WebtoonsTH : Webtoons("Webtoons.com", "https://www.webtoons.com", "th", dateFormat = SimpleDateFormat("d MMM yyyy", Locale("th")))
class WebtoonsES : Webtoons("Webtoons.com", "https://www.webtoons.com", "es") {
// Android seems to be unable to parse es dates like Indonesian; we'll use a short hard-coded table
// instead.
private val dateMap: Array<String> = arrayOf(
@ -52,5 +52,5 @@ class WebtoonsES : Webtoons("Webtoons", "https://www.webtoons.com", "es") {
return GregorianCalendar(year.toInt(), monthIndex, day.toInt()).time.time
}
}
class WebtoonsFR : Webtoons("Webtoons", "https://www.webtoons.com", "fr", dateFormat = SimpleDateFormat("d MMM yyyy", Locale.FRENCH))
class WebtoonsZH : Webtoons("Webtoons", "https://www.webtoons.com", "zh", "zh-hant", "zh_TW", SimpleDateFormat("yyyy/MM/dd", Locale.TRADITIONAL_CHINESE))
class WebtoonsFR : Webtoons("Webtoons.com", "https://www.webtoons.com", "fr", dateFormat = SimpleDateFormat("d MMM yyyy", Locale.FRENCH))
class WebtoonsZH : Webtoons("Webtoons.com", "https://www.webtoons.com", "zh", "zh-hant", "zh_TW", SimpleDateFormat("yyyy/MM/dd", Locale.TRADITIONAL_CHINESE))

View File

@ -13,7 +13,7 @@ class WebtoonsGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 1
override val sources = listOf(
MultiLang("Webtoons.com", "https://www.webtoons.com", listOf("en", "fr", "es", "id", "th", "zh"), className = "WebtoonsFactory", pkgName = "webtoons", overrideVersionCode = 26),
MultiLang("Webtoons.com", "https://www.webtoons.com", listOf("en", "fr", "es", "id", "th", "zh"), className = "WebtoonsFactory", pkgName = "webtoons", overrideVersionCode = 27),
SingleLang("Dongman Manhua", "https://www.dongmanmanhua.cn", "zh")
)