LeviatanScans: Fix dates, description and status (#12690)
This commit is contained in:
parent
8f64f6480e
commit
1ab1c80127
|
@ -6,6 +6,8 @@ import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
class LeviatanScansFactory : SourceFactory {
|
class LeviatanScansFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
|
@ -13,7 +15,8 @@ class LeviatanScansFactory : SourceFactory {
|
||||||
LeviatanScansES(),
|
LeviatanScansES(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
class LeviatanScansEN : Madara("Leviatan Scans", "https://leviatanscans.com", "en") {
|
|
||||||
|
class LeviatanScansEN : Madara("Leviatan Scans", "https://leviatanscans.com", "en", SimpleDateFormat("MMM, yy", Locale.US)) {
|
||||||
override val useNewChapterEndpoint: Boolean = true
|
override val useNewChapterEndpoint: Boolean = true
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element) =
|
override fun popularMangaFromElement(element: Element) =
|
||||||
|
@ -28,9 +31,10 @@ class LeviatanScansEN : Madara("Leviatan Scans", "https://leviatanscans.com", "e
|
||||||
override fun chapterFromElement(element: Element) =
|
override fun chapterFromElement(element: Element) =
|
||||||
replaceRandomUrlPartInChapter(super.chapterFromElement(element))
|
replaceRandomUrlPartInChapter(super.chapterFromElement(element))
|
||||||
|
|
||||||
override val mangaDetailsSelectorDescription = "div.post-content div.manga-excerpt"
|
override val mangaDetailsSelectorStatus = ".post-content_item:contains(Status) .summary-content"
|
||||||
}
|
}
|
||||||
class LeviatanScansES : Madara("Leviatan Scans", "https://es.leviatanscans.com", "es") {
|
|
||||||
|
class LeviatanScansES : Madara("Leviatan Scans", "https://es.leviatanscans.com", "es", SimpleDateFormat("MMM, yy", Locale("es"))) {
|
||||||
override val useNewChapterEndpoint: Boolean = true
|
override val useNewChapterEndpoint: Boolean = true
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element) =
|
override fun popularMangaFromElement(element: Element) =
|
||||||
|
@ -44,6 +48,8 @@ class LeviatanScansES : Madara("Leviatan Scans", "https://es.leviatanscans.com",
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element) =
|
override fun chapterFromElement(element: Element) =
|
||||||
replaceRandomUrlPartInChapter(super.chapterFromElement(element))
|
replaceRandomUrlPartInChapter(super.chapterFromElement(element))
|
||||||
|
|
||||||
|
override val mangaDetailsSelectorStatus = ".post-content_item:contains(Status) .summary-content"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Madara.replaceRandomUrlPartInManga(manga: SManga): SManga {
|
fun Madara.replaceRandomUrlPartInManga(manga: SManga): SManga {
|
||||||
|
|
|
@ -13,7 +13,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||||
override val baseVersionCode: Int = 23
|
override val baseVersionCode: Int = 23
|
||||||
|
|
||||||
override val sources = listOf(
|
override val sources = listOf(
|
||||||
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 9),
|
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 10),
|
||||||
MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1),
|
MultiLang("MangaForFree.net", "https://mangaforfree.net", listOf("en", "ko", "all"), isNsfw = true, className = "MangaForFreeFactory", pkgName = "mangaforfree", overrideVersionCode = 1),
|
||||||
MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 2),
|
MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 2),
|
||||||
MultiLang("Olympus Scanlation", "https://olympusscanlation.com", listOf("es", "pt-BR")),
|
MultiLang("Olympus Scanlation", "https://olympusscanlation.com", listOf("es", "pt-BR")),
|
||||||
|
|
Loading…
Reference in New Issue