[Mangadex] Handle empty title case, where title is romaji-only (ja) or otherwise missing, by picking whatever value is in title field as a last resort (#9598)
This commit is contained in:
parent
86b92e4b82
commit
b143713590
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'MangaDex'
|
extName = 'MangaDex'
|
||||||
pkgNameSuffix = 'all.mangadex'
|
pkgNameSuffix = 'all.mangadex'
|
||||||
extClass = '.MangaDexFactory'
|
extClass = '.MangaDexFactory'
|
||||||
extVersionCode = 139
|
extVersionCode = 140
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,6 +183,8 @@ class MangaDexHelper() {
|
||||||
val altTitle = it.asMdMap()
|
val altTitle = it.asMdMap()
|
||||||
altTitle[lang] ?: altTitle["en"] != null
|
altTitle[lang] ?: altTitle["en"] != null
|
||||||
}?.asMdMap()?.values?.singleOrNull()
|
}?.asMdMap()?.values?.singleOrNull()
|
||||||
|
?: titleMap["ja"] // romaji titles are sometimes ja (and are not altTitles)
|
||||||
|
?: titleMap.values.firstOrNull() // use literally anything from title as a last resort
|
||||||
title = cleanString(dirtyTitle ?: "")
|
title = cleanString(dirtyTitle ?: "")
|
||||||
|
|
||||||
coverFileName?.let {
|
coverFileName?.let {
|
||||||
|
|
Loading…
Reference in New Issue