Madara Update (#4672)

Madara Update
This commit is contained in:
Riztard Lanthorn 2020-10-22 05:12:03 +07:00 committed by GitHub
parent 469f065d7f
commit d35e657cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Madara (multiple sources)'
pkgNameSuffix = "all.madara"
extClass = '.MadaraFactory'
extVersionCode = 146
extVersionCode = 147
libVersion = '1.2'
containsNsfw = true
}

View File

@ -440,6 +440,10 @@ abstract class Madara(
date.endsWith(" atrás", ignoreCase = true) -> {
parseRelativeDate(date)
}
// Handle translated 'ago' in Turkish.
date.endsWith(" önce", ignoreCase = true) -> {
parseRelativeDate(date)
}
// Handle 'yesterday' and 'today', using midnight
date.startsWith("year", ignoreCase = true) -> {
Calendar.getInstance().apply {
@ -480,9 +484,9 @@ abstract class Madara(
val cal = Calendar.getInstance()
return when {
WordSet("jour", "día", "dia", "day").anyWordIn(date) -> cal.apply { add(Calendar.DAY_OF_MONTH, -number) }.timeInMillis
WordSet("heure", "hora", "hour").anyWordIn(date) -> cal.apply { add(Calendar.HOUR, -number) }.timeInMillis
WordSet("min", "minute", "minuto").anyWordIn(date) -> cal.apply { add(Calendar.MINUTE, -number) }.timeInMillis
WordSet("gün", "jour", "día", "dia", "day").anyWordIn(date) -> cal.apply { add(Calendar.DAY_OF_MONTH, -number) }.timeInMillis
WordSet("saat", "heure", "hora", "hour").anyWordIn(date) -> cal.apply { add(Calendar.HOUR, -number) }.timeInMillis
WordSet("dakika", "min", "minute", "minuto").anyWordIn(date) -> cal.apply { add(Calendar.MINUTE, -number) }.timeInMillis
WordSet("segundo", "second").anyWordIn(date) -> cal.apply { add(Calendar.SECOND, -number) }.timeInMillis
else -> 0
}

View File

@ -64,6 +64,7 @@ class MadaraFactory : SourceFactory {
GuncelManga(),
HeroManhua(),
HerozScanlation(),
HimeraFansub(),
Hiperdex(),
HunterFansub(),
IchirinNoHanaYuri(),
@ -83,8 +84,10 @@ class MadaraFactory : SourceFactory {
MangaAction(),
MangaArabOnline(),
MangaArabTeam(),
MangaBaz(),
MangaBob(),
MangaClash(),
MangaCultivator(),
MangaDods(),
MangaHentai(),
MangaKiss(),
@ -115,6 +118,7 @@ class MadaraFactory : SourceFactory {
MangazukiMe(),
MangazukiOnline(),
ManhuaBox(),
Manhuaga(),
ManhuaPlus(),
ManhuaUS(),
ManhuasWorld(),
@ -148,6 +152,7 @@ class MadaraFactory : SourceFactory {
RaiderScans(),
ReadManhua(),
RenaScans(),
RuyaManga(),
S2Manga(),
Skymanga(),
TheTopComic(),
@ -193,6 +198,16 @@ class MadaraFactory : SourceFactory {
)
}
class RuyaManga : Madara("Rüya Manga", "https://www.ruyamanga.com", "tr", SimpleDateFormat("dd MMMM yyyy", Locale.forLanguageTag("tr")))
class HimeraFansub : Madara("Himera Fansub", "https://himera-fansub.com", "tr", SimpleDateFormat("dd MMMM yyyy", Locale.forLanguageTag("tr")))
class MangaBaz : Madara("MangaBaz", "https://mangabaz.com", "tr", SimpleDateFormat("dd MMMM yyyy", Locale.forLanguageTag("tr")))
class Manhuaga : Madara("Manhuaga", "https://manhuaga.com", "en")
class MangaCultivator : Madara("MangaCultivator", "https://mangacultivator.com", "en")
class HerozScanlation : Madara("Heroz Scanlation", "https://herozscans.com", "en")
class CatOnHeadTranslations : Madara("CatOnHeadTranslations", "https://catonhead.com", "en")