Format MAL search result status/type better

This commit is contained in:
arkon 2020-12-21 17:24:25 -05:00
parent 0b62fa8b76
commit e7ef974a39

View File

@ -99,8 +99,8 @@ class MyAnimeListApi(private val client: OkHttpClient, interceptor: MyAnimeListI
total_chapters = obj["num_chapters"]!!.jsonPrimitive.int
cover_url = obj["main_picture"]?.jsonObject?.get("large")?.jsonPrimitive?.content ?: ""
tracking_url = "https://myanimelist.net/manga/$media_id"
publishing_status = obj["status"]!!.jsonPrimitive.content
publishing_type = obj["media_type"]!!.jsonPrimitive.content
publishing_status = obj["status"]!!.jsonPrimitive.content.replace("_", " ")
publishing_type = obj["media_type"]!!.jsonPrimitive.content.replace("_", " ")
start_date = try {
val outputDf = SimpleDateFormat("yyyy-MM-dd", Locale.US)
outputDf.format(obj["start_date"]!!)