From cae8d8604ce6b7c44969bb1376f99730eb81fa89 Mon Sep 17 00:00:00 2001 From: firelight <147925818+fire-light42@users.noreply.github.com> Date: Mon, 29 Jul 2024 00:48:36 +0200 Subject: [PATCH] Fix startDate --- .../cloudstream3/syncproviders/providers/MALApi.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt index 8e3ab4f6..08c18653 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt @@ -449,10 +449,10 @@ class MALApi(index: Int) : AccountManager(index), SyncAPI { null, null, plot = this.node.synopsis, - releaseDate = if (this.node.start_date == null) null else try {Date.from( + releaseDate = if (this.node.startDate == null) null else try {Date.from( Instant.from( - DateTimeFormatter.ofPattern(if (this.node.start_date.length == 4) "yyyy" else if (this.node.start_date.length == 7) "yyyy-MM" else "yyyy-MM-dd") - .parse(this.node.start_date) + DateTimeFormatter.ofPattern(if (this.node.startDate.length == 4) "yyyy" else if (this.node.startDate.length == 7) "yyyy-MM" else "yyyy-MM-dd") + .parse(this.node.startDate) ) )} catch (_: RuntimeException) {null} )