Fix TvType for all plugins

This commit is contained in:
Jace 2022-10-16 16:11:19 +08:00
parent 0dd66ffdea
commit 2d5ab87eeb
27 changed files with 61 additions and 61 deletions

View file

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

View file

@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.select.Elements
class HentaiHaven : MainAPI() {
private val globalTvType = TvType.TvSeries
private val globalTvType = TvType.NSFW
override var name = "Hentai Haven"
override var mainUrl = "https://hentaihaven.xxx"
override val supportedTypes = setOf(TvType.NSFW)
@ -17,18 +17,6 @@ class HentaiHaven : MainAPI() {
override val hasMainPage= true
override val hasQuickSearch = false
private data class ResponseJson(
@JsonProperty("data") val data: ResponseData?
)
private data class ResponseData(
@JsonProperty("sources") val sources: List<ResponseSources>? = listOf()
)
private data class ResponseSources(
@JsonProperty("src") val src: String?,
@JsonProperty("type") val type: String?,
@JsonProperty("label") val label: String?
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
@ -221,4 +209,16 @@ class HentaiHaven : MainAPI() {
)
} ?: listOf()
}
private data class ResponseJson(
@JsonProperty("data") val data: ResponseData?
)
private data class ResponseData(
@JsonProperty("sources") val sources: List<ResponseSources>? = listOf()
)
private data class ResponseSources(
@JsonProperty("src") val src: String?,
@JsonProperty("type") val type: String?,
@JsonProperty("label") val label: String?
)
}