Properly process chapters without a group name (#8785)
* Fixed MangaDex content rating preferences being swapped * Properly process anonymous chapters * Remembered to account for empty string
This commit is contained in:
parent
08246bf4e8
commit
f77b170e45
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'MangaDex'
|
||||
pkgNameSuffix = 'all.mangadex'
|
||||
extClass = '.MangaDexFactory'
|
||||
extVersionCode = 128
|
||||
extVersionCode = 129
|
||||
libVersion = '1.2'
|
||||
containsNsfw = true
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ class MangaDexHelper() {
|
|||
return SManga.create().apply {
|
||||
url = "/manga/${mangaDto.data.id}"
|
||||
title = cleanString(mangaDto.data.attributes.title.asMdMap()["en"] ?: "")
|
||||
|
||||
|
||||
coverFileName?.let {
|
||||
thumbnail_url = when(coverSuffix != null && coverSuffix != "") {
|
||||
true -> "${MDConstants.cdnUrl}/covers/${mangaDto.data.id}/$coverFileName$coverSuffix"
|
||||
|
@ -260,6 +260,8 @@ class MangaDexHelper() {
|
|||
)
|
||||
}.mapNotNull { it.attributes!!.name }
|
||||
.joinToString(" & ")
|
||||
.replace("no group", "No Group")
|
||||
.ifEmpty { "No Group" }
|
||||
|
||||
val chapterName = mutableListOf<String>()
|
||||
// Build chapter name
|
||||
|
@ -289,6 +291,7 @@ class MangaDexHelper() {
|
|||
if (chapterName.isEmpty()) {
|
||||
chapterName.add("Oneshot")
|
||||
}
|
||||
|
||||
// In future calculate [END] if non mvp api doesnt provide it
|
||||
|
||||
return SChapter.create().apply {
|
||||
|
|
Loading…
Reference in New Issue