Fix chapternumber x.x.x format (#5536)
This commit is contained in:
parent
f85a84d5fe
commit
221cda7694
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Remanga'
|
||||
pkgNameSuffix = 'ru.remanga'
|
||||
extClass = '.Remanga'
|
||||
extVersionCode = 14
|
||||
extVersionCode = 15
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -294,8 +294,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
|||
|
||||
@SuppressLint("DefaultLocale")
|
||||
private fun chapterName(book: BookDto): String {
|
||||
val chapterId: Any = if (book.chapter % 1 == 0f) book.chapter.toInt() else book.chapter
|
||||
var chapterName = "${book.tome}. Глава $chapterId"
|
||||
var chapterName = "${book.tome}. Глава ${book.chapter}"
|
||||
if (book.name.isNotBlank()) {
|
||||
chapterName += " ${book.name.capitalize()}"
|
||||
}
|
||||
|
@ -306,7 +305,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
|||
val chapters = gson.fromJson<PageWrapperDto<BookDto>>(response.body()?.charStream()!!)
|
||||
return chapters.content.filter { !it.is_paid or it.is_bought }.map { chapter ->
|
||||
SChapter.create().apply {
|
||||
chapter_number = chapter.chapter
|
||||
chapter_number = 1F
|
||||
name = chapterName(chapter)
|
||||
url = "/api/titles/chapters/${chapter.id}"
|
||||
date_upload = parseDate(chapter.upload_date)
|
||||
|
|
|
@ -70,7 +70,7 @@ data class PublisherDto(
|
|||
data class BookDto(
|
||||
val id: Long,
|
||||
val tome: Int,
|
||||
val chapter: Float,
|
||||
val chapter: String,
|
||||
val name: String,
|
||||
val upload_date: String,
|
||||
val is_paid: Boolean,
|
||||
|
|
Loading…
Reference in New Issue