mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Fixed MAL start date parsing
The previous approach would always throw an Exception because `SimpleDateFormat.format()` expects the input to be of type `Date` or `Number`, not `String`.
This commit is contained in:
parent
c0059846b7
commit
0b1ed293f3
2 changed files with 2 additions and 6 deletions
|
@ -42,6 +42,7 @@
|
|||
- Fixed kitsu tracker issue due to domain change
|
||||
- Fixed entry custom cover won't load if entry doesn't have cover from source
|
||||
- Fixed unread badge doesn't work properly for some sources (notably Komga)
|
||||
- Fixed MAL start date parsing (@MajorTanya)
|
||||
|
||||
## Translation
|
||||
- Update Japanese translation (@akir45)
|
||||
|
|
|
@ -116,12 +116,7 @@ class MyAnimeListApi(private val client: OkHttpClient, interceptor: MyAnimeListI
|
|||
tracking_url = "https://myanimelist.net/manga/$media_id"
|
||||
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"]!!)
|
||||
} catch (e: Exception) {
|
||||
""
|
||||
}
|
||||
start_date = obj["start_date"]?.jsonPrimitive?.content ?: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue