forked from recloudstream/cloudstream
fixed tenshi
This commit is contained in:
parent
f90b582b96
commit
1cc8bab5b0
1 changed files with 3 additions and 2 deletions
|
@ -143,7 +143,8 @@ class TenshiProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
private fun dateParser(dateString: String): String? {
|
private fun dateParser(dateString: String?): String? {
|
||||||
|
if(dateString == null) return null
|
||||||
try {
|
try {
|
||||||
val format = SimpleDateFormat("dd 'of' MMM',' yyyy")
|
val format = SimpleDateFormat("dd 'of' MMM',' yyyy")
|
||||||
val newFormat = SimpleDateFormat("dd-MM-yyyy")
|
val newFormat = SimpleDateFormat("dd-MM-yyyy")
|
||||||
|
@ -242,7 +243,7 @@ class TenshiProvider : MainAPI() {
|
||||||
it.attr("href"),
|
it.attr("href"),
|
||||||
it.selectFirst(".episode-title")?.text()?.trim(),
|
it.selectFirst(".episode-title")?.text()?.trim(),
|
||||||
it.selectFirst("img")?.attr("src"),
|
it.selectFirst("img")?.attr("src"),
|
||||||
dateParser(it.selectFirst(".episode-date").text().trim()),
|
dateParser(it?.selectFirst(".episode-date")?.text()?.trim()),
|
||||||
null,
|
null,
|
||||||
it.attr("data-content").trim(),
|
it.attr("data-content").trim(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue