stremiox: fix sourceName

This commit is contained in:
hexated 2023-04-02 11:33:33 +07:00
parent d0ebf315a1
commit 980accc762
2 changed files with 5 additions and 1 deletions

View File

@ -347,7 +347,7 @@ open class StremioX : MainAPI() {
callback.invoke(
ExtractorLink(
name ?: "",
title ?: name ?: "",
fixRDSourceName(name, title),
url,
referer ?: "",
getQualityFromName(description),

View File

@ -4,6 +4,10 @@ fun String.fixSourceUrl() : String {
return this.replace("/manifest.json", "").replace("stremio://", "https://")
}
fun fixRDSourceName(name: String?, title: String?) : String {
return if(name?.contains("[RD+]") == true) "[RD+] $title" else name ?: title ?: ""
}
fun getEpisodeSlug(
season: Int? = null,
episode: Int? = null,