Webnovel updates (#16246)
Add On Hiatus status and update cycle to description
This commit is contained in:
parent
2e68fc15f6
commit
e55fb1a7fe
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'Webnovel.com'
|
extName = 'Webnovel.com'
|
||||||
pkgNameSuffix = 'en.webnovel'
|
pkgNameSuffix = 'en.webnovel'
|
||||||
extClass = '.Webnovel'
|
extClass = '.Webnovel'
|
||||||
extVersionCode = 7
|
extVersionCode = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -22,6 +22,7 @@ import uy.kohesive.injekt.injectLazy
|
|||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
class Webnovel : HttpSource() {
|
class Webnovel : HttpSource() {
|
||||||
|
|
||||||
@ -130,11 +131,18 @@ class Webnovel : HttpSource() {
|
|||||||
url = comic.id
|
url = comic.id
|
||||||
thumbnail_url = getCoverUrl(comic.id)
|
thumbnail_url = getCoverUrl(comic.id)
|
||||||
author = comic.authorName
|
author = comic.authorName
|
||||||
description = comic.description
|
description = buildString {
|
||||||
|
append(comic.description)
|
||||||
|
if (comic.actionStatus == ComicDetailInfoDto.ONGOING && comic.updateCycle.isNotBlank()) {
|
||||||
|
append("\n\nInformation:")
|
||||||
|
append("\n• ${comic.updateCycle.replaceFirstChar { it.uppercase(Locale.ENGLISH) }}")
|
||||||
|
}
|
||||||
|
}
|
||||||
genre = comic.categoryName
|
genre = comic.categoryName
|
||||||
status = when (comic.actionStatus) {
|
status = when (comic.actionStatus) {
|
||||||
1 -> SManga.ONGOING
|
ComicDetailInfoDto.ONGOING -> SManga.ONGOING
|
||||||
2 -> SManga.COMPLETED
|
ComicDetailInfoDto.COMPLETED -> SManga.COMPLETED
|
||||||
|
ComicDetailInfoDto.ON_HIATUS -> SManga.ON_HIATUS
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,14 @@ data class ComicDetailInfoDto(
|
|||||||
val authorName: String,
|
val authorName: String,
|
||||||
val categoryName: String,
|
val categoryName: String,
|
||||||
val description: String,
|
val description: String,
|
||||||
)
|
val updateCycle: String,
|
||||||
|
) {
|
||||||
|
companion object {
|
||||||
|
const val ONGOING = 1
|
||||||
|
const val COMPLETED = 2
|
||||||
|
const val ON_HIATUS = 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ComicChapterListDto(
|
data class ComicChapterListDto(
|
||||||
@ -63,17 +70,17 @@ data class ComicChapterDto(
|
|||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChapterContentResponseDto(
|
data class ChapterContentResponseDto(
|
||||||
@SerialName("chapterInfo") val chapterContent: ChapterContentDto
|
@SerialName("chapterInfo") val chapterContent: ChapterContentDto,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChapterContentDto(
|
data class ChapterContentDto(
|
||||||
@SerialName("chapterId") val id: Long,
|
@SerialName("chapterId") val id: Long,
|
||||||
@SerialName("chapterPage") val pages: List<ChapterPageDto>
|
@SerialName("chapterPage") val pages: List<ChapterPageDto>,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class ChapterPageDto(
|
data class ChapterPageDto(
|
||||||
@SerialName("pageId") val id: String,
|
@SerialName("pageId") val id: String,
|
||||||
val url: String
|
val url: String,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user