Move ZeroScans (#1867)

Move ZeroScans
This commit is contained in:
Mike 2019-12-10 08:09:20 -05:00 committed by arkon
parent a6ed48f4f1
commit 482e03f449
5 changed files with 23 additions and 26 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Genkan (multiple sources)'
pkgNameSuffix = 'all.genkan'
extClass = '.GenkanFactory'
extVersionCode = 8
extVersionCode = 9
libVersion = '1.2'
}

View File

@ -97,31 +97,29 @@ abstract class Genkan(
}
override fun mangaDetailsParse(document: Document): SManga {
val infoElement = document.select("div#content").first()
val manga = SManga.create()
manga.title = infoElement.select("h5").first().text()
manga.description = document.select("div.col-lg-9").text().substringAfter("Description ").substringBefore(" Volume")
manga.thumbnail_url = styleToUrl(document.select("div.media a").first())
return manga
return SManga.create().apply {
title = document.select("div#content h5").first().text()
description = document.select("div.col-lg-9").text().substringAfter("Description ").substringBefore(" Volume")
thumbnail_url = styleToUrl(document.select("div.media a").first())
}
}
override fun chapterListSelector() = "div.col-lg-9 div.flex"
override fun chapterFromElement(element: Element): SChapter {
val urlElement = element.select("a.item-author")
return SChapter.create().apply {
val chapNum = urlElement.attr("href").split("/").last()
val chapter = SChapter.create()
chapter.setUrlWithoutDomain(urlElement.attr("href"))
if (urlElement.text().contains("Chapter $chapNum")) {
chapter.name = urlElement.text()
} else {
chapter.name = "Ch. " + chapNum + ": " + urlElement.text()
val urlElement = element.select("a.item-author")
val chapNum = urlElement.attr("href").split("/").last()
setUrlWithoutDomain(urlElement.attr("href"))
name = if (urlElement.text().contains("Chapter $chapNum")) {
urlElement.text()
} else {
"Ch. $chapNum: ${urlElement.text()}"
}
date_upload = parseChapterDate(element.select("a.item-company").first().text()) ?: 0
}
chapter.date_upload = parseChapterDate(element.select("a.item-company").first().text()) ?: 0
return chapter
}
companion object {
@ -194,7 +192,7 @@ abstract class GenkanOriginal(
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
if (page == 1) searchPage = 1
searchQuery = query.toLowerCase()
searchQuery = query
return popularMangaRequest(page)
}
@ -219,7 +217,7 @@ abstract class GenkanOriginal(
private fun getMatchesFrom(document: Document): MutableList<SManga> {
val searchMatches = mutableListOf<SManga>()
document.select(searchMangaSelector())
.filter { it.text().toLowerCase().contains(searchQuery) }
.filter { it.text().contains(searchQuery, ignoreCase = true) }
.map { searchMatches.add(searchMangaFromElement(it)) }
return searchMatches

View File

@ -12,7 +12,8 @@ class GenkanFactory : SourceFactory {
KaguyaDex(),
KomiScans(),
HunlightScans(),
WoweScans()
WoweScans(),
ZeroScans()
)
}
@ -27,3 +28,4 @@ class KaguyaDex : GenkanOriginal("KaguyaDex", " https://kaguyadex.com", "en")
class KomiScans : GenkanOriginal("Komi Scans", " https://komiscans.com", "en")
class HunlightScans : Genkan("Hunlight Scans", "https://hunlight-scans.info", "en")
class WoweScans : Genkan("Wowe Scans", "https://wowescans.co", "en")
class ZeroScans : Genkan("ZeroScans", "https://zeroscans.com", "en")

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Madara (multiple sources)'
pkgNameSuffix = "all.madara"
extClass = '.MadaraFactory'
extVersionCode = 34
extVersionCode = 35
libVersion = '1.2'
}

View File

@ -23,7 +23,6 @@ class MadaraFactory : SourceFactory {
Mangasushi(),
NinjaScans(),
ReadManhua(),
ZeroScans(),
IsekaiScanCom(),
HappyTeaScans(),
JustForFun(),
@ -72,8 +71,6 @@ class NinjaScans : Madara("NinjaScans", "https://ninjascans.com", "en")
class ReadManhua : Madara("ReadManhua", "https://readmanhua.net", "en",
dateFormat = SimpleDateFormat("dd MMM yy", Locale.US))
class ZeroScans : Madara("ZeroScans", "https://zeroscans.com", "en")
class IsekaiScanCom : Madara("IsekaiScan.com", "https://isekaiscan.com/", "en")
class HappyTeaScans : Madara("Happy Tea Scans", "https://happyteascans.com/", "en")