mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 01:29:02 +03:00
Fix Kitsu synopsis nullability
This time, the Kitsu API docs are silent on whether this field (or any other field) can be null/undefined/etc, but it can happen and caused an error during search and update. This change just ensures the attribute is nullable and is set to an empty String when it is null. Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
This commit is contained in:
parent
12ae69f06e
commit
34deae5e27
1 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ data class KitsuListSearchResult(
|
|||
title = manga.canonicalTitle
|
||||
total_chapters = manga.chapterCount ?: 0
|
||||
cover_url = manga.posterImage?.original ?: ""
|
||||
summary = manga.synopsis
|
||||
summary = manga.synopsis ?: ""
|
||||
tracking_url = KitsuApi.mangaUrl(remote_id)
|
||||
publishing_status = manga.status
|
||||
publishing_type = manga.mangaType ?: ""
|
||||
|
@ -59,7 +59,7 @@ data class KitsuListSearchResult(
|
|||
title = anime.canonicalTitle
|
||||
total_episodes = anime.episodeCount ?: 0
|
||||
cover_url = anime.posterImage?.original ?: ""
|
||||
summary = anime.synopsis
|
||||
summary = anime.synopsis ?: ""
|
||||
tracking_url = KitsuApi.animeUrl(remote_id)
|
||||
publishing_status = anime.status
|
||||
publishing_type = anime.showType ?: ""
|
||||
|
@ -109,7 +109,7 @@ data class KitsuListSearchItemIncludedAttributes(
|
|||
val mangaType: String?,
|
||||
val showType: String?,
|
||||
val posterImage: KitsuSearchItemCover?,
|
||||
val synopsis: String,
|
||||
val synopsis: String?,
|
||||
val startDate: String?,
|
||||
val status: String,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue