small fix

This commit is contained in:
PokerFace 2023-03-17 08:46:03 +07:00 committed by GitHub
parent d778515969
commit f6eb96aea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.AppUtils.toJson
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import org.json.JSONObject import org.json.JSONObject
import java.net.URI
import java.net.URLEncoder import java.net.URLEncoder
private const val TRACKER_LIST_URL = private const val TRACKER_LIST_URL =
@ -214,30 +215,16 @@ class StremioProvider : MainAPI() {
} catch (ex: Throwable) { } catch (ex: Throwable) {
Log.e("Stremio", Log.getStackTraceString(ex)) Log.e("Stremio", Log.getStackTraceString(ex))
} }
callback.invoke(
if (url.endsWith(".m3u8")) { ExtractorLink(
callback.invoke( name ?: "",
ExtractorLink( title ?: name ?: "",
name ?: "", url,
title ?: name ?: "", referer ?: "",
url, getQualityFromName(description),
referer ?: "", isM3u8 = URI(url).path.endsWith(".m3u8")
getQualityFromName(description),
isM3u8 = true
)
) )
} else { )
callback.invoke(
ExtractorLink(
name ?: "",
title ?: name ?: "",
url,
referer ?: "",
Qualities.Unknown.value,
isM3u8 = false
)
)
}
subtitles.map { sub -> subtitles.map { sub ->
subtitleCallback.invoke( subtitleCallback.invoke(
SubtitleFile( SubtitleFile(