update mangafox external source (#136)
* update mangafox external source to match most up to date of internal tachiyomi app (actually matching Flats pull request #1119) * fixed incorrect package * updated version code * updated to latest LibVersion updated extVersion * fixed suffix since doesn't need to increment since lib did.
This commit is contained in:
parent
72a6ca9712
commit
16cb360cae
|
@ -5,9 +5,9 @@ ext {
|
|||
appName = 'Tachiyomi: Mangafox'
|
||||
pkgNameSuffix = "en.mangafox"
|
||||
extClass = '.Mangafox'
|
||||
extVersionCode = 1
|
||||
extVersionSuffix = 1
|
||||
libVersion = '1.0'
|
||||
extVersionCode = 2
|
||||
extVersionSuffix = 0
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
package eu.kanade.tachiyomi.extension.en.mangafox
|
||||
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.*
|
||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||
|
@ -17,7 +16,7 @@ class Mangafox : ParsedHttpSource() {
|
|||
|
||||
override val name = "Mangafox"
|
||||
|
||||
override val baseUrl = "http://mangafox.me"
|
||||
override val baseUrl = "http://mangafox.la"
|
||||
|
||||
override val lang = "en"
|
||||
|
||||
|
@ -61,7 +60,7 @@ class Mangafox : ParsedHttpSource() {
|
|||
is Status -> url.addQueryParameter(filter.id, filter.state.toString())
|
||||
is GenreList -> filter.state.forEach { genre -> url.addQueryParameter(genre.id, genre.state.toString()) }
|
||||
is TextField -> url.addQueryParameter(filter.key, filter.state)
|
||||
is Type -> url.addQueryParameter("type", if(filter.state == 0) "" else filter.state.toString())
|
||||
is Type -> url.addQueryParameter("type", if (filter.state == 0) "" else filter.state.toString())
|
||||
is OrderBy -> {
|
||||
url.addQueryParameter("sort", arrayOf("name", "rating", "views", "total_chapters", "last_chapter_time")[filter.state!!.index])
|
||||
url.addQueryParameter("order", if (filter.state?.ascending == true) "az" else "za")
|
||||
|
@ -89,13 +88,20 @@ class Mangafox : ParsedHttpSource() {
|
|||
val infoElement = document.select("div#title").first()
|
||||
val rowElement = infoElement.select("table > tbody > tr:eq(1)").first()
|
||||
val sideInfoElement = document.select("#series_info").first()
|
||||
val licensedElement = document.select("div.warning").first()
|
||||
|
||||
val manga = SManga.create()
|
||||
manga.author = rowElement.select("td:eq(1)").first()?.text()
|
||||
manga.artist = rowElement.select("td:eq(2)").first()?.text()
|
||||
manga.genre = rowElement.select("td:eq(3)").first()?.text()
|
||||
manga.description = infoElement.select("p.summary").first()?.text()
|
||||
manga.status = sideInfoElement.select(".data").first()?.text().orEmpty().let { parseStatus(it) }
|
||||
val isLicensed = licensedElement?.text()?.contains("licensed")
|
||||
if (isLicensed == true) {
|
||||
manga.status = SManga.LICENSED
|
||||
} else {
|
||||
manga.status = sideInfoElement.select(".data").first()?.text().orEmpty().let { parseStatus(it) }
|
||||
}
|
||||
|
||||
manga.thumbnail_url = sideInfoElement.select("div.cover > img").first()?.attr("src")
|
||||
return manga
|
||||
}
|
||||
|
@ -113,7 +119,7 @@ class Mangafox : ParsedHttpSource() {
|
|||
|
||||
val chapter = SChapter.create()
|
||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||
chapter.name = urlElement.text()
|
||||
chapter.name = element.select("span.title.nowrap").first()?.text()?.let { urlElement.text() + " - " + it } ?: urlElement.text()
|
||||
chapter.date_upload = element.select("span.date").first()?.text()?.let { parseChapterDate(it) } ?: 0
|
||||
return chapter
|
||||
}
|
||||
|
@ -169,6 +175,7 @@ class Mangafox : ParsedHttpSource() {
|
|||
private class OrderBy : Filter.Sort("Order by",
|
||||
arrayOf("Series name", "Rating", "Views", "Total chapters", "Last chapter"),
|
||||
Filter.Sort.Selection(2, false))
|
||||
|
||||
private class GenreList(genres: List<Genre>) : Filter.Group<Genre>("Genres", genres)
|
||||
|
||||
override fun getFilterList() = FilterList(
|
||||
|
|
Loading…
Reference in New Issue