mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
remove empty list from homePage
This commit is contained in:
parent
051a72d378
commit
6ec1f6f89e
1 changed files with 12 additions and 8 deletions
|
@ -72,7 +72,7 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
if (tags?.uppercase()?.trim() == "NONE" || tags?.isBlank() == true) tags = lang
|
if (tags?.uppercase()?.trim() == "NONE" || tags?.isBlank() == true) tags = lang
|
||||||
tags = tags?.uppercase()
|
tags = tags?.uppercase()
|
||||||
mainUrl = overrideUrl.toString()
|
mainUrl = overrideUrl.toString()
|
||||||
mainUrl = when (true) { // the "c" is not needed and some provider doesn't work with it
|
mainUrl = when { // the "c" is not needed and some provider doesn't work with it
|
||||||
mainUrl.endsWith("/c/") -> mainUrl.dropLast(3)
|
mainUrl.endsWith("/c/") -> mainUrl.dropLast(3)
|
||||||
mainUrl.endsWith("/c") -> mainUrl.dropLast(2)
|
mainUrl.endsWith("/c") -> mainUrl.dropLast(2)
|
||||||
mainUrl.endsWith("/") -> mainUrl.dropLast(1)
|
mainUrl.endsWith("/") -> mainUrl.dropLast(1)
|
||||||
|
@ -195,7 +195,7 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
when {
|
when {
|
||||||
url.contains("I_Need_Help") -> { // go to see all the avalaible tags
|
url.contains("I_Need_Help") -> { // go to see all the avalaible tags
|
||||||
return LiveStreamLoadResponse(
|
return LiveStreamLoadResponse(
|
||||||
name = "GO TO CREATE YOUR \uD83C\uDDF9\u200B\u200B\u200B\u200B\u200B\uD83C\uDDE6\u200B\u200B\u200B\u200B\u200B\uD83C\uDDEC\u200B\u200B\u200B\u200B\u200B ACCOUNT eg. italia|sport|crime|uk ",
|
name = "GO TO CREATE YOUR \uD83C\uDDF9\u200B\u200B\u200B\u200B\u200B\uD83C\uDDE6\u200B\u200B\u200B\u200B\u200B\uD83C\uDDEC\u200B\u200B\u200B\u200B\u200B ACCOUNT e.g. italia|sport|crime|uk ",
|
||||||
url = url,
|
url = url,
|
||||||
apiName = this.name,
|
apiName = this.name,
|
||||||
dataUrl = url,
|
dataUrl = url,
|
||||||
|
@ -211,7 +211,7 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
apiName = this.name,
|
apiName = this.name,
|
||||||
dataUrl = url,
|
dataUrl = url,
|
||||||
posterUrl = "https://www.toutestpossible.be/wp-content/uploads/2017/05/comment-faire-des-choix-eclaires-en-10-etapes-01-300x167.jpg",
|
posterUrl = "https://www.toutestpossible.be/wp-content/uploads/2017/05/comment-faire-des-choix-eclaires-en-10-etapes-01-300x167.jpg",
|
||||||
plot = "There is a issue with this account. Please check your credentials or try another account",
|
plot = "There is an issue with this account. Please check your credentials or change your DNS or use a VPN. Otherwise try with another account",
|
||||||
comingSoon = true
|
comingSoon = true
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
val posterurl = channel.url_image.toString()
|
val posterurl = channel.url_image.toString()
|
||||||
val uppername = channelname.uppercase()
|
val uppername = channelname.uppercase()
|
||||||
val quality = getQualityFromString(
|
val quality = getQualityFromString(
|
||||||
when (!channelname.isBlank()) {
|
when (channelname.isNotBlank()) {
|
||||||
uppername.contains(findKeyWord("UHD")) -> {
|
uppername.contains(findKeyWord("UHD")) -> {
|
||||||
"UHD"
|
"UHD"
|
||||||
}
|
}
|
||||||
|
@ -507,7 +507,7 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
"\uD83C\uDDF5\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF7\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF4\u200B\u200B\u200B\u200B\u200B\uD83C\uDDE7\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF1\u200B\u200B\u200B\u200B\u200B\uD83C\uDDEA\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF2\u200B\u200B\u200B\u200B\u200B",
|
"\uD83C\uDDF5\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF7\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF4\u200B\u200B\u200B\u200B\u200B\uD83C\uDDE7\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF1\u200B\u200B\u200B\u200B\u200B\uD83C\uDDEA\u200B\u200B\u200B\u200B\u200B\uD83C\uDDF2\u200B\u200B\u200B\u200B\u200B",
|
||||||
listOf(
|
listOf(
|
||||||
LiveSearchResponse(
|
LiveSearchResponse(
|
||||||
"Contact the provider",
|
"Click to see the tips",
|
||||||
"${mainUrl}There_is_an_error", // trick to load the help page
|
"${mainUrl}There_is_an_error", // trick to load the help page
|
||||||
name,
|
name,
|
||||||
TvType.Live,
|
TvType.Live,
|
||||||
|
@ -572,7 +572,7 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
|
|
||||||
val arraychannel =
|
val arraychannel =
|
||||||
mutableListOf<Channel>() // toMutable because HomePageList need to remove element from the list
|
mutableListOf<Channel>() // toMutable because HomePageList need to remove element from the list
|
||||||
if (channels.isNotEmpty() && idGenre.contains("""\d""".toRegex()) && (categoryTitle.uppercase()
|
if (idGenre.contains("""\d+""".toRegex()) && (categoryTitle.uppercase()
|
||||||
.contains(rgxcodeCountry) ||
|
.contains(rgxcodeCountry) ||
|
||||||
categoryTitle.isContainsTargetCountry(provider)
|
categoryTitle.isContainsTargetCountry(provider)
|
||||||
) || categoryTitle.uppercase()
|
) || categoryTitle.uppercase()
|
||||||
|
@ -626,8 +626,12 @@ class MacIPTVProvider(override var lang: String) : MainAPI() {
|
||||||
} else {
|
} else {
|
||||||
"$flag ${cleanTitle(categoryTitle).replace(rgxcodeCountry, "").trim()}"
|
"$flag ${cleanTitle(categoryTitle).replace(rgxcodeCountry, "").trim()}"
|
||||||
}
|
}
|
||||||
|
if (arraychannel.isNotEmpty()) {
|
||||||
|
arraychannel.toHomePageList(nameGenre, provider, idGenre)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
|
||||||
arraychannel.toHomePageList(nameGenre, provider, idGenre)
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue