4anime: add studio and status info
This commit is contained in:
@ -5,7 +5,7 @@ ext {
|
||||
extName = '4anime.to'
|
||||
pkgNameSuffix = 'en.fouranime'
|
||||
extClass = '.FourAnime'
|
||||
extVersionCode = 5
|
||||
extVersionCode = 6
|
||||
libVersion = '10'
|
||||
}
|
||||
dependencies {
|
||||
|
@ -68,9 +68,19 @@ class FourAnime : ParsedAnimeHttpSource() {
|
||||
anime.title = document.select("p.single-anime-desktop").text()
|
||||
anime.genre = document.select("div.tag a").joinToString(", ") { it.text() }
|
||||
anime.description = document.select("div#description-mob p[class!=description-mobile]").text()
|
||||
anime.author = document.select("div.detail a[data-reactid=\".0.1.0.0.2.0.0.1.1.1.1\"]").text()
|
||||
anime.status = parseStatus(document.select("div.detail a[data-reactid=\".0.1.0.0.2.0.0.1.1.3.1\"]").text())
|
||||
return anime
|
||||
}
|
||||
|
||||
private fun parseStatus(statusString: String): Int {
|
||||
return when (statusString) {
|
||||
"Currently Airing" -> SAnime.ONGOING
|
||||
"Completed" -> SAnime.COMPLETED
|
||||
else -> SAnime.UNKNOWN
|
||||
}
|
||||
}
|
||||
|
||||
override fun latestUpdatesNextPageSelector(): String = "a.nextpostslink"
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element): SAnime {
|
||||
|
Reference in New Issue
Block a user