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( callback.invoke(
ExtractorLink( ExtractorLink(
name ?: "", name ?: "",
title ?: name ?: "", fixRDSourceName(name, title),
url, url,
referer ?: "", referer ?: "",
getQualityFromName(description), getQualityFromName(description),

View file

@ -4,6 +4,10 @@ fun String.fixSourceUrl() : String {
return this.replace("/manifest.json", "").replace("stremio://", "https://") 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( fun getEpisodeSlug(
season: Int? = null, season: Int? = null,
episode: Int? = null, episode: Int? = null,