From 7846ef133c16fdf282f405b6bc34cfe024d44e73 Mon Sep 17 00:00:00 2001 From: Dark25 Date: Mon, 21 Oct 2024 09:39:12 +0200 Subject: [PATCH 1/3] fix(es/SoloLatino): Update episode date --- src/es/sololatino/build.gradle | 2 +- .../animeextension/es/sololatino/SoloLatino.kt | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/es/sololatino/build.gradle b/src/es/sololatino/build.gradle index 5bfbd078f9..63a1644026 100644 --- a/src/es/sololatino/build.gradle +++ b/src/es/sololatino/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.SoloLatino' themePkg = 'dooplay' baseUrl = 'https://sololatino.net' - overrideVersionCode = 1 + overrideVersionCode = 2 } apply from: "$rootDir/common.gradle" diff --git a/src/es/sololatino/src/eu/kanade/tachiyomi/animeextension/es/sololatino/SoloLatino.kt b/src/es/sololatino/src/eu/kanade/tachiyomi/animeextension/es/sololatino/SoloLatino.kt index c99a1d2868..ecc89d3799 100644 --- a/src/es/sololatino/src/eu/kanade/tachiyomi/animeextension/es/sololatino/SoloLatino.kt +++ b/src/es/sololatino/src/eu/kanade/tachiyomi/animeextension/es/sololatino/SoloLatino.kt @@ -32,6 +32,8 @@ import org.jsoup.nodes.Document import org.jsoup.nodes.Element import java.net.HttpURLConnection import java.net.URL +import java.text.SimpleDateFormat +import java.util.Locale class SoloLatino : DooPlay( "es", @@ -375,7 +377,7 @@ class SoloLatino : DooPlay( else -> "tendencias" }, - ) + ) if (params.isInverted) append("&orden=asc") } @@ -468,7 +470,16 @@ class SoloLatino : DooPlay( } // ============================= Utilities ============================== - override fun String.toDate() = 0L + + override fun String.toDate(): Long { + return try { + val dateFormat = SimpleDateFormat("MMM. dd, yyyy", Locale.ENGLISH) + val date = dateFormat.parse(this) + date?.time ?: 0L + } catch (e: Exception) { + 0L + } + } override fun List