mirror of
https://github.com/Jacekun/cs3xxx-repo.git
synced 2024-08-14 23:57:09 +00:00
Various cleanups
This commit is contained in:
parent
14e8cf2f0f
commit
ca5ed299dc
9 changed files with 20 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.example"/>
|
||||
<manifest package="com.lagradost"/>
|
|
@ -6,13 +6,13 @@ import com.lagradost.cloudstream3.utils.*
|
|||
|
||||
|
||||
class XvideosProvider : MainAPI() {
|
||||
private val globalTvType = TvType.NSFW
|
||||
private val globalTvType = TvType.Movie
|
||||
override var mainUrl = "https://www.xvideos.com"
|
||||
override var name = "Xvideos"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(globalTvType)
|
||||
override val supportedTypes = setOf(TvType.NSFW)
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
Pair(mainUrl, "Main Page"),
|
||||
|
@ -81,7 +81,7 @@ class XvideosProvider : MainAPI() {
|
|||
|
||||
}.toList()
|
||||
}
|
||||
override suspend fun load(url: String): LoadResponse? {
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val soup = app.get(url).document
|
||||
val title = if (url.contains("channels")||url.contains("pornstars")) soup.selectFirst("html.xv-responsive.is-desktop head title")?.text() else
|
||||
soup.selectFirst(".page-title")?.text()
|
||||
|
@ -106,7 +106,7 @@ class XvideosProvider : MainAPI() {
|
|||
name = title ?: "",
|
||||
url = url,
|
||||
apiName = this.name,
|
||||
type = globalTvType,
|
||||
type = tvType,
|
||||
episodes = episodes,
|
||||
posterUrl = poster,
|
||||
plot = title,
|
||||
|
@ -114,7 +114,7 @@ class XvideosProvider : MainAPI() {
|
|||
tags = tags,
|
||||
)
|
||||
}
|
||||
TvType.NSFW -> {
|
||||
else -> {
|
||||
MovieLoadResponse(
|
||||
name = title ?: "",
|
||||
url = url,
|
||||
|
@ -126,7 +126,6 @@ class XvideosProvider : MainAPI() {
|
|||
tags = tags,
|
||||
)
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
override suspend fun loadLinks(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue