Add support to the cancelled status in TaoSect. (#12122)
This commit is contained in:
parent
4f83ca4c81
commit
1de4b7e286
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'Tao Sect'
|
extName = 'Tao Sect'
|
||||||
pkgNameSuffix = 'pt.taosect'
|
pkgNameSuffix = 'pt.taosect'
|
||||||
extClass = '.TaoSect'
|
extClass = '.TaoSect'
|
||||||
extVersionCode = 18
|
extVersionCode = 19
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class TaoSect : HttpSource() {
|
|||||||
override fun latestUpdatesParse(response: Response): MangasPage {
|
override fun latestUpdatesParse(response: Response): MangasPage {
|
||||||
val result = response.parseAs<List<TaoSectChapterDto>>()
|
val result = response.parseAs<List<TaoSectChapterDto>>()
|
||||||
|
|
||||||
if (result.isNullOrEmpty()) {
|
if (result.isEmpty()) {
|
||||||
return MangasPage(emptyList(), hasNextPage = false)
|
return MangasPage(emptyList(), hasNextPage = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ class TaoSect : HttpSource() {
|
|||||||
override fun mangaDetailsParse(response: Response): SManga {
|
override fun mangaDetailsParse(response: Response): SManga {
|
||||||
val result = response.parseAs<List<TaoSectProjectDto>>()
|
val result = response.parseAs<List<TaoSectProjectDto>>()
|
||||||
|
|
||||||
if (result.isNullOrEmpty()) {
|
if (result.isEmpty()) {
|
||||||
throw Exception(PROJECT_NOT_FOUND)
|
throw Exception(PROJECT_NOT_FOUND)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ class TaoSect : HttpSource() {
|
|||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
val result = response.parseAs<List<TaoSectChapterDto>>()
|
val result = response.parseAs<List<TaoSectChapterDto>>()
|
||||||
|
|
||||||
if (result.isNullOrEmpty()) {
|
if (result.isEmpty()) {
|
||||||
throw Exception(CHAPTERS_NOT_FOUND)
|
throw Exception(CHAPTERS_NOT_FOUND)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ class TaoSect : HttpSource() {
|
|||||||
override fun pageListParse(response: Response): List<Page> {
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
val result = response.parseAs<TaoSectChapterDto>()
|
val result = response.parseAs<TaoSectChapterDto>()
|
||||||
|
|
||||||
if (result.pages.isNullOrEmpty()) {
|
if (result.pages.isEmpty()) {
|
||||||
return emptyList()
|
return emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,6 +358,7 @@ class TaoSect : HttpSource() {
|
|||||||
private fun String.toStatus() = when (this) {
|
private fun String.toStatus() = when (this) {
|
||||||
"Ativos" -> SManga.ONGOING
|
"Ativos" -> SManga.ONGOING
|
||||||
"Finalizados", "Oneshots" -> SManga.COMPLETED
|
"Finalizados", "Oneshots" -> SManga.COMPLETED
|
||||||
|
"Cancelados" -> SManga.CANCELLED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user