mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 22:37:56 +01:00 
			
		
		
		
	Fix MAL main_picture nullability breaking search if a result doesn't have a cover set (#1618)
				
					
				
			* Fix MAL manga cover nullability If a manga doesn't have a cover, MAL doesn't provide the `main_picture` element in the API response at all. * Add CHANGELOG.md entry
This commit is contained in:
		| @@ -14,6 +14,9 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co | ||||
| ### Added | ||||
| - Add option to always decode long strip images with SSIV | ||||
|  | ||||
| ### Fixed | ||||
| - Fix MAL `main_picture` nullability breaking search if a result doesn't have a cover set ([@MajorTanya](https://github.com/MajorTanya)) ([#1618](https://github.com/mihonapp/mihon/pull/1618)) | ||||
|  | ||||
| ## [v0.17.1] - 2024-12-06 | ||||
| ### Changed | ||||
| - Bump default user agent ([@AntsyLich](https://github.com/AntsyLich)) ([`76dcf90`](https://github.com/mihonapp/mihon/commit/76dcf903403d565056f44c66d965c1ea8affffc3)) | ||||
|   | ||||
| @@ -111,7 +111,7 @@ class MyAnimeListApi( | ||||
|                             summary = it.synopsis | ||||
|                             total_chapters = it.numChapters | ||||
|                             score = it.mean | ||||
|                             cover_url = it.covers.large | ||||
|                             cover_url = it.covers?.large.orEmpty() | ||||
|                             tracking_url = "https://myanimelist.net/manga/$remote_id" | ||||
|                             publishing_status = it.status.replace("_", " ") | ||||
|                             publishing_type = it.mediaType.replace("_", " ") | ||||
|   | ||||
| @@ -12,7 +12,7 @@ data class MALManga( | ||||
|     val numChapters: Long, | ||||
|     val mean: Double = -1.0, | ||||
|     @SerialName("main_picture") | ||||
|     val covers: MALMangaCovers, | ||||
|     val covers: MALMangaCovers?, | ||||
|     val status: String, | ||||
|     @SerialName("media_type") | ||||
|     val mediaType: String, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user