Lint fixes
This commit is contained in:
parent
991704be0b
commit
7e2e2f39fe
@ -7,11 +7,11 @@ class EmeraldFactory : SourceFactory {
|
||||
override fun createSources(): List<Source> = languages.map { Mangawindow(it.first, it.second) } + languages.map { Batoto(it.first, it.second) }
|
||||
}
|
||||
|
||||
class Mangawindow(tachiLang: String, siteLang: String)
|
||||
: Emerald("Mangawindow", "https://mangawindow.net", tachiLang, siteLang)
|
||||
class Mangawindow(tachiLang: String, siteLang: String) :
|
||||
Emerald("Mangawindow", "https://mangawindow.net", tachiLang, siteLang)
|
||||
|
||||
class Batoto(tachiLang: String, siteLang: String)
|
||||
: Emerald("Bato.to", "https://bato.to", tachiLang, siteLang)
|
||||
class Batoto(tachiLang: String, siteLang: String) :
|
||||
Emerald("Bato.to", "https://bato.to", tachiLang, siteLang)
|
||||
|
||||
private val languages = listOf(
|
||||
Pair("ar", "arabic"),
|
||||
|
@ -19,16 +19,16 @@ abstract class PaprikaAlt(
|
||||
override fun popularMangaSelector() = "div.anipost"
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
//Log.d("Paprika", "processing popular element")
|
||||
// Log.d("Paprika", "processing popular element")
|
||||
return SManga.create().apply {
|
||||
element.select("a:has(h2)").let {
|
||||
setUrlWithoutDomain(it.attr("href"))
|
||||
title = it.text()
|
||||
//Log.d("Paprika", "manga url: $url")
|
||||
//Log.d("Paprika", "manga title: $title")
|
||||
// Log.d("Paprika", "manga url: $url")
|
||||
// Log.d("Paprika", "manga title: $title")
|
||||
}
|
||||
thumbnail_url = element.select("img").attr("abs:src")
|
||||
//Log.d("Paprika", "manga thumb: $thumbnail_url")
|
||||
// Log.d("Paprika", "manga thumb: $thumbnail_url")
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ abstract class PaprikaAlt(
|
||||
}
|
||||
description = document.select("#noidungm").joinToString("\n") { it.text() }
|
||||
|
||||
//Log.d("Paprika", "mangaDetials")
|
||||
// Log.d("Paprika", "mangaDetials")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,9 @@ 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.HttpSource
|
||||
import java.util.ArrayList
|
||||
import kotlin.experimental.and
|
||||
import kotlin.experimental.xor
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
@ -20,9 +23,6 @@ import okhttp3.Response
|
||||
import okhttp3.ResponseBody
|
||||
import org.json.JSONObject
|
||||
import rx.Observable
|
||||
import java.util.ArrayList
|
||||
import kotlin.experimental.and
|
||||
import kotlin.experimental.xor
|
||||
|
||||
/**
|
||||
* INKR source - same old MR code, though
|
||||
@ -276,16 +276,16 @@ class INKR : HttpSource() {
|
||||
// Doc: https://developers.google.com/speed/webp/docs/riff_container#webp_file_header
|
||||
val buffer = ByteArray(data.size + 15)
|
||||
val size = data.size + 7
|
||||
buffer[0] = 82 // R
|
||||
buffer[1] = 73 // I
|
||||
buffer[2] = 70 // F
|
||||
buffer[3] = 70 // F
|
||||
buffer[0] = 82 // R
|
||||
buffer[1] = 73 // I
|
||||
buffer[2] = 70 // F
|
||||
buffer[3] = 70 // F
|
||||
buffer[4] = (255.toByte() and size.toByte())
|
||||
buffer[5] = (size ushr 8).toByte() and 255.toByte()
|
||||
buffer[6] = (size ushr 16).toByte() and 255.toByte()
|
||||
buffer[7] = (size ushr 24).toByte() and 255.toByte()
|
||||
buffer[8] = 87 // W
|
||||
buffer[9] = 69 // E
|
||||
buffer[8] = 87 // W
|
||||
buffer[9] = 69 // E
|
||||
buffer[10] = 66 // B
|
||||
buffer[11] = 80 // P
|
||||
buffer[12] = 86 // V
|
||||
@ -303,7 +303,6 @@ class INKR : HttpSource() {
|
||||
|
||||
private class StatusFilter : Filter.TriState("Completed")
|
||||
|
||||
|
||||
private class SortBy : UriPartFilter("Sort by", arrayOf(
|
||||
Pair("Name", "name"),
|
||||
Pair("Rank", "rank")
|
||||
@ -351,5 +350,4 @@ class INKR : HttpSource() {
|
||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||
fun toUriPart() = vals[state].second
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ class MangaPark : ConfigurableSource, ParsedHttpSource() {
|
||||
chapterFromElement(chapterElement, sourceName, lastNum)
|
||||
.also { lastNum = it.chapter_number }
|
||||
}
|
||||
.distinctBy { it.chapter_number } // there's even duplicate chapters within a source ( -.- )
|
||||
.distinctBy { it.chapter_number } // there's even duplicate chapters within a source ( -.- )
|
||||
}
|
||||
|
||||
return when (getSourcePref()) {
|
||||
|
@ -4,26 +4,25 @@ import com.github.salomonbrys.kotson.fromJson
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonArray
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
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 java.text.SimpleDateFormat
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
import kotlin.experimental.and
|
||||
import kotlin.experimental.xor
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.ResponseBody
|
||||
import okhttp3.HttpUrl
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.Calendar
|
||||
import kotlin.experimental.and
|
||||
import kotlin.experimental.xor
|
||||
|
||||
|
||||
class MangaRockEs : ParsedHttpSource() {
|
||||
|
||||
@ -189,16 +188,16 @@ class MangaRockEs : ParsedHttpSource() {
|
||||
// Doc: https://developers.google.com/speed/webp/docs/riff_container#webp_file_header
|
||||
val buffer = ByteArray(data.size + 15)
|
||||
val size = data.size + 7
|
||||
buffer[0] = 82 // R
|
||||
buffer[1] = 73 // I
|
||||
buffer[2] = 70 // F
|
||||
buffer[3] = 70 // F
|
||||
buffer[0] = 82 // R
|
||||
buffer[1] = 73 // I
|
||||
buffer[2] = 70 // F
|
||||
buffer[3] = 70 // F
|
||||
buffer[4] = (255.toByte() and size.toByte())
|
||||
buffer[5] = (size ushr 8).toByte() and 255.toByte()
|
||||
buffer[6] = (size ushr 16).toByte() and 255.toByte()
|
||||
buffer[7] = (size ushr 24).toByte() and 255.toByte()
|
||||
buffer[8] = 87 // W
|
||||
buffer[9] = 69 // E
|
||||
buffer[8] = 87 // W
|
||||
buffer[9] = 69 // E
|
||||
buffer[10] = 66 // B
|
||||
buffer[11] = 80 // P
|
||||
buffer[12] = 86 // V
|
||||
@ -311,5 +310,4 @@ class MangaRockEs : ParsedHttpSource() {
|
||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||
fun toUriPart() = vals[state].second
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||
val encoded = document.select("script:containsData(unicap)").firstOrNull()
|
||||
?.data()?.substringAfter("'")?.substringBefore("'")?.reversed()
|
||||
?: throw Exception("unicap not found")
|
||||
|
||||
|
||||
val drop = encoded.length % 4
|
||||
val decoded = Base64.decode(encoded.dropLast(drop), Base64.DEFAULT).toString(Charset.defaultCharset())
|
||||
val path = decoded.substringBefore("||")
|
||||
|
@ -5,16 +5,12 @@ import eu.kanade.tachiyomi.source.model.FilterList
|
||||
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.model.MangasPage
|
||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Response
|
||||
import org.json.JSONObject
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
|
||||
class Kombatch: ParsedHttpSource() {
|
||||
class Kombatch : ParsedHttpSource() {
|
||||
override val name = "Kombatch"
|
||||
|
||||
override val baseUrl = "https://kombatch.com"
|
||||
@ -45,7 +41,7 @@ class Kombatch: ParsedHttpSource() {
|
||||
thumbnail_url = element.select("img").attr("abs:src")
|
||||
}
|
||||
|
||||
//No next page
|
||||
// No next page
|
||||
override fun latestUpdatesNextPageSelector() = "Not used"
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList) = GET("$baseUrl/search?search=$query&page=$page", headers)
|
||||
|
Loading…
x
Reference in New Issue
Block a user