Lint fixes

This commit is contained in:
arkon 2020-04-24 23:33:36 -04:00 committed by arkon
parent 9fe99e58cb
commit 71c20924e8
8 changed files with 8 additions and 16 deletions

View File

@ -132,7 +132,7 @@ class Mangafreak : ParsedHttpSource() {
} }
override fun imageUrlParse(document: Document): String { override fun imageUrlParse(document: Document): String {
return throw Exception("Not Used") throw Exception("Not Used")
} }
// Filter // Filter

View File

@ -2,23 +2,15 @@ package eu.kanade.tachiyomi.extension.id.mangakita
import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList 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.Page
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 eu.kanade.tachiyomi.source.online.ParsedHttpSource import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document import org.jsoup.nodes.Document
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
class MangaKita: ParsedHttpSource() { class MangaKita : ParsedHttpSource() {
override val name = "MangaKita" override val name = "MangaKita"
override val baseUrl = "https://mangakita.net" override val baseUrl = "https://mangakita.net"
@ -33,7 +25,7 @@ class MangaKita: ParsedHttpSource() {
override fun popularMangaRequest(page: Int) = GET("$baseUrl/manga-list", headers) override fun popularMangaRequest(page: Int) = GET("$baseUrl/manga-list", headers)
//The page I'm getting these from has no thumbnails // The page I'm getting these from has no thumbnails
override fun popularMangaFromElement(element: Element) = SManga.create().apply { override fun popularMangaFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.attr("href")) setUrlWithoutDomain(element.attr("href"))
title = element.attr("title") title = element.attr("title")
@ -44,7 +36,7 @@ class MangaKita: ParsedHttpSource() {
override fun latestUpdatesSelector() = "div.latestSeries" override fun latestUpdatesSelector() = "div.latestSeries"
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/page/$page", headers) override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/page/$page", headers)
override fun latestUpdatesFromElement(element: Element) = SManga.create().apply { override fun latestUpdatesFromElement(element: Element) = SManga.create().apply {
setUrlWithoutDomain(element.select("a").first().attr("href")) setUrlWithoutDomain(element.select("a").first().attr("href"))
title = element.select("p.clamp2").first().ownText() title = element.select("p.clamp2").first().ownText()

View File

@ -100,9 +100,9 @@ class HanhanKuman : ParsedHttpSource() {
val re = Regex(""".*\/(.*?)\/\d+\.html\?s=(\d+)""") val re = Regex(""".*\/(.*?)\/\d+\.html\?s=(\d+)""")
val matches = re.find(url)?.groups val matches = re.find(url)?.groups!!
val pathId = matches!!.get(1)!!.value val pathId = matches[1]!!.value
val pathS = matches!!.get(2)!!.value val pathS = matches[2]!!.value
return pageListParse(response.asJsoup(), pathId, pathS) return pageListParse(response.asJsoup(), pathId, pathS)
} }

View File

@ -168,7 +168,7 @@ class Kuaikanmanhua : ParsedHttpSource() {
override fun pageListRequest(chapter: SChapter): Request { override fun pageListRequest(chapter: SChapter): Request {
if (chapter.url == "javascript:void(0);") { if (chapter.url == "javascript:void(0);") {
return throw Exception("[此章节为付费内容]") throw Exception("[此章节为付费内容]")
} }
return super.pageListRequest(chapter) return super.pageListRequest(chapter)
} }