Compare commits
3 commits
dd74d87cd8
...
7ba94d6e44
Author | SHA1 | Date | |
---|---|---|---|
7ba94d6e44 | |||
99d1c2457e | |||
1906156dc4 |
7 changed files with 27 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -68,7 +68,7 @@ class SerialnoProvider : MainAPI() {
|
|||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val document = app.post(
|
||||
url = "$mainUrl/index.php?do=search",
|
||||
url = "$mainUrl/",
|
||||
data = mapOf(
|
||||
"do" to "search",
|
||||
"subaction" to "search",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
dependencies{
|
||||
implementation("com.google.code.gson:gson:2.9.0")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.lagradost
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.lagradost.cloudstream3.DubStatus
|
||||
import com.lagradost.cloudstream3.Episode
|
||||
import com.lagradost.cloudstream3.HomePageResponse
|
||||
|
@ -21,6 +22,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
|
|||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||
import com.lagradost.models.Media
|
||||
import com.lagradost.models.MediaShows
|
||||
import com.lagradost.models.Search
|
||||
import com.lagradost.models.SeasonModel
|
||||
import com.lagradost.models.TitleShows
|
||||
import com.lagradost.models.VideoPlayer
|
||||
|
@ -42,6 +44,8 @@ class TeleportalProvider : MainAPI() {
|
|||
private val findUrl = "$apiUrl/ua/live-search?q="
|
||||
private val playerUrl = "https://vcms-api2.starlight.digital/player-api/"
|
||||
|
||||
private val listSearch = object : TypeToken<List<Search>>() {}.type
|
||||
|
||||
// Sections
|
||||
override val mainPage = mainPageOf(
|
||||
"$apiUrl/ua/serials" to "Серіали",
|
||||
|
@ -76,10 +80,11 @@ class TeleportalProvider : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
return app.get("$findUrl$query&page=1").parsedSafe<Media>()!!.items.map{
|
||||
newAnimeSearchResponse(it.title, "$apiUrl${it.videoSlug}", TvType.TvSeries) {
|
||||
this.posterUrl = "$mainUrl${it.image}"
|
||||
return Gson().fromJson<List<Search>>(app.get("$findUrl$query").text, listSearch).map{
|
||||
newAnimeSearchResponse(it.title, "$apiUrl/ua/${it.typeSlug}/${it.channelSlug}/${it.projectSlug}", TvType.TvSeries) {
|
||||
this.posterUrl = "$mainUrl/${it.image}"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package com.lagradost.models
|
||||
|
||||
|
||||
data class Search (
|
||||
val id : Int,
|
||||
val title : String,
|
||||
val age : Int,
|
||||
val image : String,
|
||||
val description : String,
|
||||
val typeSlug : String,
|
||||
val channelSlug : String,
|
||||
val projectSlug : String,
|
||||
val seasons : String
|
||||
)
|
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 8
|
||||
version = 9
|
||||
|
||||
dependencies {
|
||||
implementation("com.google.code.gson:gson:2.9.0")
|
||||
|
|
|
@ -8,7 +8,6 @@ import android.content.Context
|
|||
class UASerialProviderPlugin: Plugin() {
|
||||
override fun load(context: Context) {
|
||||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||
registerMainAPI(UASerialProvider("https://uaserial.tv", "UASerial"))
|
||||
registerMainAPI(UASerialProvider("https://uaserial.club", "UASerial.club"))
|
||||
registerMainAPI(UASerialProvider("https://uaserial.com", "UASerial"))
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue