2embed fixes (#1302)

* Update TwoEmbedProvider.kt

* Update providers.json

* Update providers.json
This commit is contained in:
Saksham Shekher 2022-07-17 20:00:14 +05:30 committed by GitHub
parent 9c387ff4d8
commit 57e5d33ac4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -18,7 +18,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor
class TwoEmbedProvider : TmdbProvider() {
override val apiName = "2Embed"
override var name = "2Embed"
override var mainUrl = "https://www.2embed.org"
override var mainUrl = "https://2embed.org"
override val useMetaLoadResponse = true
override val instantLinkLoading = false
override val supportedTypes = setOf(
@ -46,10 +46,10 @@ class TwoEmbedProvider : TmdbProvider() {
) else listOf(mappedData.tmdbID.toString(), "tmdb")
val isMovie = mappedData.episode == null && mappedData.season == null
val embedUrl = if (isMovie) {
"$mainUrl/embed/$site/movie?id=$id"
"$mainUrl/embed/movie?$site=$id"
} else {
val suffix = "$id&s=${mappedData.season ?: 1}&e=${mappedData.episode ?: 1}"
"$mainUrl/embed/$site/tv?id=$suffix"
val suffix = "$id&sea=${mappedData.season ?: 1}&epi=${mappedData.episode ?: 1}"
"$mainUrl/embed/series?$site=$suffix"
}
val document = app.get(embedUrl).document

View file

@ -497,7 +497,7 @@
"language": "en",
"name": "2Embed",
"status": 1,
"url": "https://www.2embed.org"
"url": "https://2embed.org"
},
"UakinoProvider": {
"language": "uk",

View file

@ -241,8 +241,8 @@
},
"TwoEmbedProvider": {
"name": "2Embed",
"url": "https://www.2embed.ru",
"status": 0
"url": "https://2embed.org",
"status": 1
},
"VMoveeProvider": {
"name": "VMovee",