mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Update kitsu to not show "null" for empty descriptions
(cherry picked from commit e6ea530532523ed033fd232fcea2da8f17b973f7)
This commit is contained in:
		@@ -25,7 +25,7 @@ class KitsuSearchManga(obj: JsonObject) {
 | 
			
		||||
        // posterImage is sometimes a jsonNull object instead
 | 
			
		||||
        null
 | 
			
		||||
    }
 | 
			
		||||
    private val synopsis = obj["synopsis"]!!.jsonPrimitive.content
 | 
			
		||||
    private val synopsis = obj["synopsis"]?.jsonPrimitive?.contentOrNull
 | 
			
		||||
    private var startDate = obj["startDate"]?.jsonPrimitive?.contentOrNull?.let {
 | 
			
		||||
        val outputDf = SimpleDateFormat("yyyy-MM-dd", Locale.US)
 | 
			
		||||
        outputDf.format(Date(it.toLong() * 1000))
 | 
			
		||||
@@ -38,7 +38,7 @@ class KitsuSearchManga(obj: JsonObject) {
 | 
			
		||||
        title = canonicalTitle
 | 
			
		||||
        total_chapters = chapterCount ?: 0
 | 
			
		||||
        cover_url = original ?: ""
 | 
			
		||||
        summary = synopsis
 | 
			
		||||
        summary = synopsis ?: ""
 | 
			
		||||
        tracking_url = KitsuApi.mangaUrl(media_id)
 | 
			
		||||
        publishing_status = if (endDate == null) {
 | 
			
		||||
            "Publishing"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user