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'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 128
|
extVersionCode = 129
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ class MangaDexHelper() {
|
||||||
return SManga.create().apply {
|
return SManga.create().apply {
|
||||||
url = "/manga/${mangaDto.data.id}"
|
url = "/manga/${mangaDto.data.id}"
|
||||||
title = cleanString(mangaDto.data.attributes.title.asMdMap()["en"] ?: "")
|
title = cleanString(mangaDto.data.attributes.title.asMdMap()["en"] ?: "")
|
||||||
|
|
||||||
coverFileName?.let {
|
coverFileName?.let {
|
||||||
thumbnail_url = when(coverSuffix != null && coverSuffix != "") {
|
thumbnail_url = when(coverSuffix != null && coverSuffix != "") {
|
||||||
true -> "${MDConstants.cdnUrl}/covers/${mangaDto.data.id}/$coverFileName$coverSuffix"
|
true -> "${MDConstants.cdnUrl}/covers/${mangaDto.data.id}/$coverFileName$coverSuffix"
|
||||||
|
@ -260,6 +260,8 @@ class MangaDexHelper() {
|
||||||
)
|
)
|
||||||
}.mapNotNull { it.attributes!!.name }
|
}.mapNotNull { it.attributes!!.name }
|
||||||
.joinToString(" & ")
|
.joinToString(" & ")
|
||||||
|
.replace("no group", "No Group")
|
||||||
|
.ifEmpty { "No Group" }
|
||||||
|
|
||||||
val chapterName = mutableListOf<String>()
|
val chapterName = mutableListOf<String>()
|
||||||
// Build chapter name
|
// Build chapter name
|
||||||
|
@ -289,6 +291,7 @@ class MangaDexHelper() {
|
||||||
if (chapterName.isEmpty()) {
|
if (chapterName.isEmpty()) {
|
||||||
chapterName.add("Oneshot")
|
chapterName.add("Oneshot")
|
||||||
}
|
}
|
||||||
|
|
||||||
// In future calculate [END] if non mvp api doesnt provide it
|
// In future calculate [END] if non mvp api doesnt provide it
|
||||||
|
|
||||||
return SChapter.create().apply {
|
return SChapter.create().apply {
|
||||||
|
|
Loading…
Reference in New Issue