From 5b823712fea8a86cc9dc6e1d16058f4cb870885a Mon Sep 17 00:00:00 2001 From: Antony Date: Sat, 27 Aug 2022 13:50:42 +0200 Subject: [PATCH] IlGenioDelloStreamingProvider fix --- .../kotlin/com/lagradost/IlGenioDelloStreamingProvider.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IlGenioDelloStreamingProvider/src/main/kotlin/com/lagradost/IlGenioDelloStreamingProvider.kt b/IlGenioDelloStreamingProvider/src/main/kotlin/com/lagradost/IlGenioDelloStreamingProvider.kt index f225e6d..b747ab4 100644 --- a/IlGenioDelloStreamingProvider/src/main/kotlin/com/lagradost/IlGenioDelloStreamingProvider.kt +++ b/IlGenioDelloStreamingProvider/src/main/kotlin/com/lagradost/IlGenioDelloStreamingProvider.kt @@ -115,15 +115,16 @@ class IlGenioDelloStreamingProvider : MainAPI() { val epName = episodes.firstNotNullOf{it.selectFirst("li.other_link")?.text()?:""} episodes.map{ episode -> - val subtag = episode.selectFirst("li.season-no")?.text()?.takeIf {it.contains("Sub")}?.substringAfter(" ") ?: "" + val seasonNo = episode.selectFirst("li.season-no") + val subtag = seasonNo?.text()?.takeIf {it.contains("Sub")}?.substringAfter(" ") ?: "" val urls = episode.getElementsByAttributeValue("target", "_blank").map { it.attr("href").trim() } .filter { it.isNotEmpty()}.toJson() - episodeList.add(Episode( data = urls, posterUrl = posterUrl, season = seasons.key.toIntOrNull(), name = "$epName ${subtag.uppercase()}", + episode = seasonNo?.text()?.substringAfter("x")?.filter { it.isDigit() }?.toIntOrNull() )) }