tenshi: add studio and status info

This commit is contained in:
jmir1
2021-06-03 10:33:54 +02:00
parent 8c7855a99b
commit 3e287fc7b0
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'tenshi.moe'
pkgNameSuffix = 'en.tenshimoe'
extClass = '.TenshiMoe'
extVersionCode = 8
extVersionCode = 9
libVersion = '10'
}
dependencies {

View File

@ -101,9 +101,19 @@ class TenshiMoe : ParsedAnimeHttpSource() {
anime.title = document.select("h1.mb-3").text()
anime.genre = document.select("li.genre span.value").joinToString(", ") { it.text() }
anime.description = document.select("div.card-body").text()
anime.author = document.select("li.production span.value").joinToString(", ") { it.text() }
anime.status = parseStatus(document.select("li.status span.value").text())
return anime
}
private fun parseStatus(statusString: String): Int {
return when (statusString) {
"Ongoing" -> SAnime.ONGOING
"Completed" -> SAnime.COMPLETED
else -> SAnime.UNKNOWN
}
}
override fun latestUpdatesNextPageSelector(): String = throw Exception("Not used")
override fun latestUpdatesFromElement(element: Element) = throw Exception("Not used")