mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2026-01-06 03:42:34 +01:00
Fix extracting "startDate" (#1427)
Value of json object was never properly accessed. Start date can have different formats (yyyy-MM, yyyy-MM-dd) so it's not feasible to format it
This commit is contained in:
@@ -136,13 +136,7 @@ class MyAnimeListApi(
|
||||
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"]!!)
|
||||
} catch (e: Exception) {
|
||||
""
|
||||
}
|
||||
start_date = obj["start_date"]?.jsonPrimitive?.content ?: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user