Skip to content

Commit

Permalink
fix(es/SoloLatino): Update episode date
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark25 committed Oct 21, 2024
1 parent d381f6c commit 7846ef1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/es/sololatino/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ext {
extClass = '.SoloLatino'
themePkg = 'dooplay'
baseUrl = 'https://sololatino.net'
overrideVersionCode = 1
overrideVersionCode = 2
}

apply from: "$rootDir/common.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -375,7 +377,7 @@ class SoloLatino : DooPlay(
else -> "tendencias"
},

)
)

if (params.isInverted) append("&orden=asc")
}
Expand Down Expand Up @@ -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<Video>.sort(): List<Video> {
val quality = preferences.getString(prefQualityKey, prefQualityDefault)!!
Expand Down

0 comments on commit 7846ef1

Please sign in to comment.