stremiox: fix source name form rd

This commit is contained in:
hexated 2023-04-04 04:27:03 +07:00
parent f88b511d0e
commit 8dd8440ae9
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 4
version = 5
cloudstream {

View file

@ -5,7 +5,12 @@ fun String.fixSourceUrl() : String {
}
fun fixRDSourceName(name: String?, title: String?) : String {
return if(name?.contains("[RD+]") == true) "[RD+] $title" else name ?: title ?: ""
return when {
name?.contains("[RD+]", true) == true -> "[RD+] $title"
name?.contains("[RD download]", true) == true -> "[RD] $title"
!name.isNullOrEmpty() && !title.isNullOrEmpty() -> "$name $title"
else -> title ?: name ?: ""
}
}
fun getEpisodeSlug(