[Mangadex] Fix uploader username handling (#12096)
This commit is contained in:
parent
9ebac7a263
commit
d74e4708d7
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'MangaDex'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 160
|
extVersionCode = 161
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -331,11 +331,7 @@ class MangaDexHelper(private val lang: String) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.mapNotNull { it.attributes!!.username }
|
.mapNotNull { it.attributes!!.username }
|
||||||
|
if (users.isNotEmpty()) intl.uploadedBy(users) else ""
|
||||||
users.joinToString(
|
|
||||||
" & ",
|
|
||||||
if (users.isNotEmpty()) intl.uploadedBy(users.toString()) else ""
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
.ifEmpty { intl.noGroup } // "No Group" as final resort
|
.ifEmpty { intl.noGroup } // "No Group" as final resort
|
||||||
|
|
||||||
|
|
|
@ -636,9 +636,9 @@ class MangaDexIntl(val lang: String) {
|
||||||
else -> "Unable to process Chapter request. HTTP code: $code"
|
else -> "Unable to process Chapter request. HTTP code: $code"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun uploadedBy(user: String): String = when (availableLang) {
|
fun uploadedBy(users: List<String>): String = when (availableLang) {
|
||||||
BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Enviado por $user"
|
BRAZILIAN_PORTUGUESE, PORTUGUESE -> "Enviado por ${users.joinToString(" & ")}"
|
||||||
else -> "Uploaded by $user"
|
else -> "Uploaded by ${users.joinToString(" & ")}"
|
||||||
}
|
}
|
||||||
|
|
||||||
val noGroup: String = when (availableLang) {
|
val noGroup: String = when (availableLang) {
|
||||||
|
|
Loading…
Reference in New Issue