From b143713590b1b12b1e0e56f592d32ff636f8277a Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Sat, 23 Oct 2021 04:37:24 -0700 Subject: [PATCH] [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) --- src/all/mangadex/build.gradle | 2 +- .../kanade/tachiyomi/extension/all/mangadex/MangaDexHelper.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/all/mangadex/build.gradle b/src/all/mangadex/build.gradle index 411dbcbfc..854de00ba 100644 --- a/src/all/mangadex/build.gradle +++ b/src/all/mangadex/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'MangaDex' pkgNameSuffix = 'all.mangadex' extClass = '.MangaDexFactory' - extVersionCode = 139 + extVersionCode = 140 isNsfw = true } diff --git a/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MangaDexHelper.kt b/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MangaDexHelper.kt index fe850ea6e..30b5a17c4 100644 --- a/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MangaDexHelper.kt +++ b/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MangaDexHelper.kt @@ -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 {