Use a empty title if none is found
This commit is contained in:
parent
a856ea20b4
commit
866c4a77a3
@ -56,7 +56,7 @@ class ApiMangaParser(
|
||||
try {
|
||||
val mangaAttributesDto = mangaDto.data.attributes
|
||||
mdUuid = mangaDto.data.id
|
||||
title = MdUtil.cleanString(mangaAttributesDto.title.asMdMap().let { it[lang] ?: it["en"]!! })
|
||||
title = MdUtil.cleanString(mangaAttributesDto.title.asMdMap().let { it[lang] ?: it["en"].orEmpty() })
|
||||
altTitles = mangaAttributesDto.altTitles.mapNotNull { it[lang] }.nullIfEmpty()
|
||||
|
||||
mangaDto.relationships
|
||||
|
@ -265,7 +265,7 @@ class MdUtil {
|
||||
fun createMangaEntry(json: MangaDto, lang: String): MangaInfo {
|
||||
return MangaInfo(
|
||||
key = buildMangaUrl(json.data.id),
|
||||
title = cleanString(json.data.attributes.title.asMdMap().let { it[lang] ?: it["en"]!! }),
|
||||
title = cleanString(json.data.attributes.title.asMdMap().let { it[lang] ?: it["en"].orEmpty() }),
|
||||
cover = json.relationships
|
||||
.firstOrNull { relationshipDto -> relationshipDto.type == MdConstants.Types.coverArt }
|
||||
?.attributes
|
||||
|
Loading…
x
Reference in New Issue
Block a user