small fix

This commit is contained in:
hexated 2023-09-21 14:50:29 +07:00
parent cdf15ff08a
commit 10b3595c0e
2 changed files with 3 additions and 2 deletions

View File

@ -1338,7 +1338,7 @@ fun isUpcoming(dateString: String?): Boolean {
return try {
val format = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
val dateTime = dateString?.let { format.parse(it)?.time } ?: return false
return unixTimeMS < dateTime
unixTimeMS < dateTime
} catch (t: Throwable) {
logError(t)
false

View File

@ -1,6 +1,7 @@
package com.hexated
import com.lagradost.cloudstream3.APIHolder
import com.lagradost.cloudstream3.APIHolder.unixTimeMS
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.nicehttp.Requests.Companion.await
import okhttp3.OkHttpClient
@ -62,7 +63,7 @@ fun isUpcoming(dateString: String?): Boolean {
return try {
val format = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
val dateTime = dateString?.let { format.parse(it)?.time } ?: return false
return APIHolder.unixTimeMS < dateTime
unixTimeMS < dateTime
} catch (t: Throwable) {
logError(t)
false