[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:
FlaminSarge 2021-10-23 04:37:24 -07:00 committed by GitHub
parent 86b92e4b82
commit b143713590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaDex'
pkgNameSuffix = 'all.mangadex'
extClass = '.MangaDexFactory'
extVersionCode = 139
extVersionCode = 140
isNsfw = true
}

View File

@ -183,6 +183,8 @@ class MangaDexHelper() {
val altTitle = it.asMdMap()
altTitle[lang] ?: altTitle["en"] != null
}?.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 ?: "")
coverFileName?.let {