feat: prepend series title in front of book name for read lists (#10831)

This commit is contained in:
Gauthier 2022-02-15 20:38:30 +08:00 committed by GitHub
parent 643d072d5b
commit 2a793c16ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,11 @@
## 1.2.39
Minimum Komga version required: `0.151.0`
### Features
* Prepend series name in front of books within readlists
## 1.2.38
Minimum Komga version required: `0.113.0`

View File

@ -6,7 +6,7 @@ ext {
extName = 'Komga'
pkgNameSuffix = 'all.komga'
extClass = '.KomgaFactory'
extVersionCode = 38
extVersionCode = 39
}
dependencies {

View File

@ -213,7 +213,7 @@ open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() {
val r = page.mapIndexed { index, book ->
SChapter.create().apply {
chapter_number = if (!response.fromReadList()) book.metadata.numberSort else index + 1F
name = "${if (!response.fromReadList()) "${book.metadata.number} - " else ""}${book.metadata.title} (${book.size})"
name = "${if (!response.fromReadList()) "${book.metadata.number} - " else "${book.seriesTitle} ${book.metadata.number}: "}${book.metadata.title} (${book.size})"
url = "$baseUrl/api/v1/books/${book.id}"
scanlator = book.metadata.authors.groupBy({ it.role }, { it.name })["translator"]?.joinToString()
date_upload = book.metadata.releaseDate?.let { parseDate(it) }

View File

@ -60,6 +60,7 @@ data class BookMetadataAggregationDto(
data class BookDto(
val id: String,
val seriesId: String,
val seriesTitle: String,
val name: String,
val number: Float,
val created: String?,