Fix linting errors
This commit is contained in:
parent
c6374f7feb
commit
0640b31137
|
@ -13,7 +13,6 @@ import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
|||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.jsonArray
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||
import okhttp3.OkHttpClient
|
||||
|
@ -305,7 +304,6 @@ open class BatoTo(
|
|||
throw RuntimeException("Unexpected Branch: Please File A Bug Report describing this issue")
|
||||
// val imgJson = json.parseToJsonElement(script.substringAfter("var images = ").substringBefore(";")).jsonObject
|
||||
// imgJson.keys.forEachIndexed { i, s -> pages.add(Page(i, imageUrl = imgJson[s]!!.jsonPrimitive.content)) }
|
||||
|
||||
} else if (script.contains("const server =")) { // bato.to
|
||||
val duktape = Duktape.create()
|
||||
val encryptedServer = script.substringAfter("const server = ").substringBefore(";")
|
||||
|
|
|
@ -35,11 +35,11 @@ private val languages = listOf(
|
|||
LanguageOption("ms"),
|
||||
LanguageOption("pl"),
|
||||
LanguageOption("pt"),
|
||||
LanguageOption("pt-BR","pt_br"),
|
||||
LanguageOption("pt-BR", "pt_br"),
|
||||
LanguageOption("ro"),
|
||||
LanguageOption("ru"),
|
||||
LanguageOption("es"),
|
||||
LanguageOption("es-419","es_419"),
|
||||
LanguageOption("es-419", "es_419"),
|
||||
LanguageOption("sv"),
|
||||
LanguageOption("th"),
|
||||
LanguageOption("tr"),
|
||||
|
@ -57,10 +57,10 @@ private val languages = listOf(
|
|||
LanguageOption("km"),
|
||||
LanguageOption("ca"),
|
||||
LanguageOption("ceb"),
|
||||
LanguageOption("zh-rHK","zh_hk"),
|
||||
LanguageOption("zh-rTW","zh_tw"),
|
||||
LanguageOption("zh-rHK", "zh_hk"),
|
||||
LanguageOption("zh-rTW", "zh_tw"),
|
||||
LanguageOption("hr"),
|
||||
LanguageOption("en-US","en_us"),
|
||||
LanguageOption("en-US", "en_us"),
|
||||
LanguageOption("eo"),
|
||||
LanguageOption("et"),
|
||||
LanguageOption("fo"),
|
||||
|
@ -118,7 +118,7 @@ private val languages = listOf(
|
|||
LanguageOption("other", "_t"),
|
||||
// Lang options from bato.to brows not in publish.bato.to
|
||||
LanguageOption("eu"),
|
||||
LanguageOption("pt-PT","pt_pt"),
|
||||
LanguageOption("pt-PT", "pt_pt"),
|
||||
// Lang options that got removed
|
||||
// Pair("xh", "xh"),
|
||||
)
|
||||
|
|
|
@ -97,7 +97,7 @@ class NineHentai : HttpSource() {
|
|||
}
|
||||
return mutableList
|
||||
}
|
||||
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> {
|
||||
val document = response.asJsoup()
|
||||
val time = document.select("div#info div time").text()
|
||||
|
@ -109,7 +109,7 @@ class NineHentai : HttpSource() {
|
|||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
private fun parseChapterDate(date: String): Long {
|
||||
val value = date.split(' ')[0].toInt()
|
||||
val timeStr = date.split(' ')[1].removeSuffix("s")
|
||||
|
|
|
@ -87,7 +87,7 @@ class Mangadog : HttpSource() {
|
|||
return MangasPage(mangaList, hasNextPage = false)
|
||||
}
|
||||
|
||||
private fun searchMangaFromJson(jsonObj: JsonObject): SManga = SManga.create().apply{
|
||||
private fun searchMangaFromJson(jsonObj: JsonObject): SManga = SManga.create().apply {
|
||||
title = jsonObj["value"]!!.jsonPrimitive.content.trim()
|
||||
|
||||
val dataValue = jsonObj["data"]!!.jsonPrimitive.content.replace("\\/", "/")
|
||||
|
@ -122,7 +122,7 @@ class Mangadog : HttpSource() {
|
|||
return SimpleDateFormat("yyyy-MM-dd", Locale.US).parse(date)?.time ?: 0L
|
||||
}
|
||||
|
||||
override fun mangaDetailsParse(response: Response): SManga = SManga.create().apply{
|
||||
override fun mangaDetailsParse(response: Response): SManga = SManga.create().apply {
|
||||
val document = response.asJsoup()
|
||||
|
||||
thumbnail_url = document.select("img.detail-post-img").attr("abs:src")
|
||||
|
|
|
@ -79,15 +79,15 @@ class PatchFriday : HttpSource() {
|
|||
.map { parseChapters(it) }
|
||||
}
|
||||
|
||||
private fun parseChapters (response: Response): List<SChapter>{
|
||||
private fun parseChapters(response: Response): List<SChapter> {
|
||||
val chapters = mutableListOf<SChapter>()
|
||||
var document = response.asJsoup()
|
||||
var page = document.select("div > div:first-of-type > div:first-of-type > a").attr("abs:href").replace(baseUrl,"").replace("/","").trim().toInt()
|
||||
var page = document.select("div > div:first-of-type > div:first-of-type > a").attr("abs:href").replace(baseUrl, "").replace("/", "").trim().toInt()
|
||||
while (page > 0) {
|
||||
val element = document.select("div > div > div:first-of-type > a")
|
||||
element.forEach {
|
||||
val chapter = SChapter.create()
|
||||
chapter.url = it.attr("abs:href").replace(baseUrl,"").trim()
|
||||
chapter.url = it.attr("abs:href").replace(baseUrl, "").trim()
|
||||
chapter.chapter_number = chapter.url.replace("/", "").trim().toFloat()
|
||||
chapter.name = "#${chapter.chapter_number.toInt()} - ${it.text()}"
|
||||
chapter.date_upload = System.currentTimeMillis()
|
||||
|
@ -96,19 +96,20 @@ class PatchFriday : HttpSource() {
|
|||
page -= 10
|
||||
document = client.newCall(GET("$baseUrl/search/?search=;id=$page", headers)).execute().asJsoup()
|
||||
}
|
||||
//Add First Chapter becouse for some reason it does not show up in chapter search
|
||||
chapters.add(SChapter.create().apply {
|
||||
url = "/1/"
|
||||
chapter_number = url.replace("/", "").trim().toFloat()
|
||||
name = "#${chapter_number.toInt()} - The One"
|
||||
date_upload = System.currentTimeMillis()
|
||||
})
|
||||
// Add First Chapter becouse for some reason it does not show up in chapter search
|
||||
chapters.add(
|
||||
SChapter.create().apply {
|
||||
url = "/1/"
|
||||
chapter_number = url.replace("/", "").trim().toFloat()
|
||||
name = "#${chapter_number.toInt()} - The One"
|
||||
date_upload = System.currentTimeMillis()
|
||||
}
|
||||
)
|
||||
return chapters
|
||||
}
|
||||
|
||||
override fun chapterListParse(response: Response): List<SChapter> = throw UnsupportedOperationException("Not used")
|
||||
|
||||
|
||||
// Pages
|
||||
|
||||
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
|
||||
|
|
|
@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.es.inmanga
|
|||
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.source.model.*
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.decodeFromString
|
||||
|
|
|
@ -16,7 +16,6 @@ import okhttp3.FormBody
|
|||
import okhttp3.Headers
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.RequestBody
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
@ -73,7 +72,7 @@ class DigitalTeam : ParsedHttpSource() {
|
|||
|
||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply{
|
||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||
val infoElement = document.select("#manga_left")
|
||||
|
||||
author = infoElement.select(".info_name:contains(Autore)").next()?.text()
|
||||
|
|
Loading…
Reference in New Issue