mirror of
https://github.com/recloudstream/cloudstream-extensions.git
synced 2024-08-15 03:03:54 +00:00
small fix
This commit is contained in:
parent
d778515969
commit
f6eb96aea5
1 changed files with 10 additions and 23 deletions
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
|||
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||
import org.json.JSONObject
|
||||
import java.net.URI
|
||||
import java.net.URLEncoder
|
||||
|
||||
private const val TRACKER_LIST_URL =
|
||||
|
@ -214,30 +215,16 @@ class StremioProvider : MainAPI() {
|
|||
} catch (ex: Throwable) {
|
||||
Log.e("Stremio", Log.getStackTraceString(ex))
|
||||
}
|
||||
|
||||
if (url.endsWith(".m3u8")) {
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
name ?: "",
|
||||
title ?: name ?: "",
|
||||
url,
|
||||
referer ?: "",
|
||||
getQualityFromName(description),
|
||||
isM3u8 = true
|
||||
)
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
name ?: "",
|
||||
title ?: name ?: "",
|
||||
url,
|
||||
referer ?: "",
|
||||
getQualityFromName(description),
|
||||
isM3u8 = URI(url).path.endsWith(".m3u8")
|
||||
)
|
||||
} else {
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
name ?: "",
|
||||
title ?: name ?: "",
|
||||
url,
|
||||
referer ?: "",
|
||||
Qualities.Unknown.value,
|
||||
isM3u8 = false
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
subtitles.map { sub ->
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
|
|
Loading…
Reference in a new issue