4anime: add studio and status info

This commit is contained in:
jmir1
2021-06-03 10:28:18 +02:00
parent 8366a96891
commit 8c7855a99b
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = '4anime.to' extName = '4anime.to'
pkgNameSuffix = 'en.fouranime' pkgNameSuffix = 'en.fouranime'
extClass = '.FourAnime' extClass = '.FourAnime'
extVersionCode = 5 extVersionCode = 6
libVersion = '10' libVersion = '10'
} }
dependencies { dependencies {

View File

@ -68,9 +68,19 @@ class FourAnime : ParsedAnimeHttpSource() {
anime.title = document.select("p.single-anime-desktop").text() anime.title = document.select("p.single-anime-desktop").text()
anime.genre = document.select("div.tag a").joinToString(", ") { it.text() } anime.genre = document.select("div.tag a").joinToString(", ") { it.text() }
anime.description = document.select("div#description-mob p[class!=description-mobile]").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 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 latestUpdatesNextPageSelector(): String = "a.nextpostslink"
override fun latestUpdatesFromElement(element: Element): SAnime { override fun latestUpdatesFromElement(element: Element): SAnime {