feat: moved hentaicube (#11552)

This commit is contained in:
Alexander Chernov 2022-04-21 20:40:50 +01:00 committed by GitHub
parent 1bf3540a5c
commit a39e5b24ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 18 deletions

View File

@ -0,0 +1,32 @@
package eu.kanade.tachiyomi.extension.vi.hentaicube
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Page
import okhttp3.CacheControl
import okhttp3.Request
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale
class HentaiCB : Madara("Hentai CB", "https://hentaicb.top", "vi", SimpleDateFormat("dd/MM/yyyy", Locale("vi"))) {
override val id: Long = 823638192569572166
override val useLoadMoreSearch = false
override fun pageListParse(document: Document): List<Page> {
return super.pageListParse(document).distinctBy { it.imageUrl }
}
override fun popularMangaRequest(page: Int): Request {
return GET(
"$baseUrl/manga/?m_orderby=trending",
formHeaders,
CacheControl.FORCE_NETWORK
)
}
override fun latestUpdatesRequest(page: Int): Request {
return GET(
"$baseUrl/manga/?m_orderby=latest",
formHeaders,
CacheControl.FORCE_NETWORK
)
}
}

View File

@ -1,17 +0,0 @@
package eu.kanade.tachiyomi.extension.vi.hentaicube
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.source.model.Page
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale
class HentaiCube : Madara("Hentai Cube", "https://hentaicube.net", "vi", SimpleDateFormat("dd/MM/yyyy", Locale("vi"))) {
override fun pageListParse(document: Document): List<Page> {
val urls = mutableListOf<String>()
return super.pageListParse(document).filter {
!urls.contains(it.imageUrl)
urls.add(it.imageUrl!!)
}
}
}

View File

@ -119,7 +119,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Harimanga", "https://harimanga.com", "en", overrideVersionCode = 1),
SingleLang("Hattori Manga", "https://hattorimanga.com", "tr", isNsfw = true),
SingleLang("Hayalistic", "https://hayalistic.com", "tr"),
SingleLang("Hentai Cube", "https://hentaicube.net", "vi", isNsfw = true),
SingleLang("Hentai CB", "https://hentaicb.top", "vi", isNsfw = true, overrideVersionCode = 1, pkgName = "hentaicube"),
SingleLang("Hentai Manga", "https://hentaimanga.me", "en", isNsfw = true, overrideVersionCode = 1),
SingleLang("Hentai Teca", "https://hentaiteca.net", "pt-BR", isNsfw = true, overrideVersionCode = 1),
SingleLang("Hentai20", "https://hentai20.com", "en", isNsfw = true, overrideVersionCode = 1),