IkigaiMangas: Add chapter title and update default base url (#11103)
add chapter title
This commit is contained in:
parent
d7241034bc
commit
a78b2624da
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Ikigai Mangas'
|
extName = 'Ikigai Mangas'
|
||||||
extClass = '.IkigaiMangas'
|
extClass = '.IkigaiMangas'
|
||||||
extVersionCode = 26
|
extVersionCode = 27
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class IkigaiMangas : HttpSource(), ConfigurableSource {
|
|||||||
else -> preferences.prefBaseUrl
|
else -> preferences.prefBaseUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
private val defaultBaseUrl: String = "https://visualikigai.eurofiyati.online"
|
private val defaultBaseUrl: String = "https://visualikigai.tutorialesminecraft.com"
|
||||||
|
|
||||||
private val fetchedDomainUrl: String by lazy {
|
private val fetchedDomainUrl: String by lazy {
|
||||||
if (!preferences.fetchDomainPref()) return@lazy preferences.prefBaseUrl
|
if (!preferences.fetchDomainPref()) return@lazy preferences.prefBaseUrl
|
||||||
|
|||||||
@ -88,11 +88,17 @@ class PayloadChaptersDto(
|
|||||||
class ChapterDto(
|
class ChapterDto(
|
||||||
private val id: Long,
|
private val id: Long,
|
||||||
private val name: String,
|
private val name: String,
|
||||||
|
private val title: String? = null,
|
||||||
@SerialName("published_at") val date: String,
|
@SerialName("published_at") val date: String,
|
||||||
) {
|
) {
|
||||||
fun toSChapter(dateFormat: SimpleDateFormat) = SChapter.create().apply {
|
fun toSChapter(dateFormat: SimpleDateFormat) = SChapter.create().apply {
|
||||||
url = "/capitulo/$id/"
|
url = "/capitulo/$id/"
|
||||||
name = "Capítulo ${this@ChapterDto.name}"
|
name = buildString {
|
||||||
|
append("Capítulo ${this@ChapterDto.name}")
|
||||||
|
title?.let {
|
||||||
|
append(": $it")
|
||||||
|
}
|
||||||
|
}
|
||||||
date_upload = try {
|
date_upload = try {
|
||||||
dateFormat.parse(date)?.time ?: 0L
|
dateFormat.parse(date)?.time ?: 0L
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user