mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
stremiox: bump
This commit is contained in:
parent
d8d2f69191
commit
d0ebf315a1
3 changed files with 11 additions and 11 deletions
|
@ -1,12 +1,12 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
language = "en"
|
language = "en"
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
description = "- Stremiox allows you to use stream addons \n- Stremio allows you to use catalog addons \n<!> Requires Setup"
|
description = "- StremioX allows you to use stream addons \n- StremioC allows you to use catalog addons \n<!> Requires Setup"
|
||||||
authors = listOf("Hexated")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,9 +13,9 @@ import java.net.URI
|
||||||
private const val TRACKER_LIST_URL =
|
private const val TRACKER_LIST_URL =
|
||||||
"https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt"
|
"https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt"
|
||||||
|
|
||||||
class Stremio : MainAPI() {
|
class StremioC : MainAPI() {
|
||||||
override var mainUrl = "https://stremio.github.io/stremio-static-addon-example"
|
override var mainUrl = "https://stremio.github.io/stremio-static-addon-example"
|
||||||
override var name = "Stremio"
|
override var name = "StremioC"
|
||||||
override val supportedTypes = setOf(TvType.Others)
|
override val supportedTypes = setOf(TvType.Others)
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
private val cinemataUrl = "https://v3-cinemeta.strem.io"
|
private val cinemataUrl = "https://v3-cinemeta.strem.io"
|
||||||
|
@ -83,7 +83,7 @@ class Stremio : MainAPI() {
|
||||||
if (type != null) types.add(type)
|
if (type != null) types.add(type)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun search(query: String, provider: Stremio): List<SearchResponse> {
|
suspend fun search(query: String, provider: StremioC): List<SearchResponse> {
|
||||||
val entries = mutableListOf<SearchResponse>()
|
val entries = mutableListOf<SearchResponse>()
|
||||||
types.forEach { type ->
|
types.forEach { type ->
|
||||||
val json =
|
val json =
|
||||||
|
@ -98,7 +98,7 @@ class Stremio : MainAPI() {
|
||||||
return entries
|
return entries
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun toHomePageList(provider: Stremio): HomePageList? {
|
suspend fun toHomePageList(provider: StremioC): HomePageList? {
|
||||||
val entries = mutableListOf<SearchResponse>()
|
val entries = mutableListOf<SearchResponse>()
|
||||||
types.forEach { type ->
|
types.forEach { type ->
|
||||||
val json = app.get("${provider.mainUrl}/catalog/${type}/${id}.json").text
|
val json = app.get("${provider.mainUrl}/catalog/${type}/${id}.json").text
|
||||||
|
@ -127,7 +127,7 @@ class Stremio : MainAPI() {
|
||||||
val type: String?,
|
val type: String?,
|
||||||
val videos: List<Video>?
|
val videos: List<Video>?
|
||||||
) {
|
) {
|
||||||
fun toSearchResponse(provider: Stremio): SearchResponse {
|
fun toSearchResponse(provider: StremioC): SearchResponse {
|
||||||
return provider.newMovieSearchResponse(
|
return provider.newMovieSearchResponse(
|
||||||
fixTitle(name),
|
fixTitle(name),
|
||||||
this.toJson(),
|
this.toJson(),
|
||||||
|
@ -137,7 +137,7 @@ class Stremio : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun toLoadResponse(provider: Stremio): LoadResponse {
|
suspend fun toLoadResponse(provider: StremioC): LoadResponse {
|
||||||
if (videos == null || videos.isEmpty()) {
|
if (videos == null || videos.isEmpty()) {
|
||||||
return provider.newMovieLoadResponse(
|
return provider.newMovieLoadResponse(
|
||||||
name,
|
name,
|
||||||
|
@ -180,7 +180,7 @@ class Stremio : MainAPI() {
|
||||||
@JsonProperty("overview") val overview: String? = null,
|
@JsonProperty("overview") val overview: String? = null,
|
||||||
@JsonProperty("description") val description: String? = null,
|
@JsonProperty("description") val description: String? = null,
|
||||||
) {
|
) {
|
||||||
fun toEpisode(provider: Stremio, type: String?): Episode {
|
fun toEpisode(provider: StremioC, type: String?): Episode {
|
||||||
return provider.newEpisode(
|
return provider.newEpisode(
|
||||||
"${provider.mainUrl}/stream/${type}/${id}.json"
|
"${provider.mainUrl}/stream/${type}/${id}.json"
|
||||||
) {
|
) {
|
||||||
|
@ -213,7 +213,7 @@ class Stremio : MainAPI() {
|
||||||
val subtitles: List<Subtitle> = emptyList()
|
val subtitles: List<Subtitle> = emptyList()
|
||||||
) {
|
) {
|
||||||
suspend fun runCallback(
|
suspend fun runCallback(
|
||||||
provider: Stremio,
|
provider: StremioC,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
|
@ -10,6 +10,6 @@ class StremioXPlugin: Plugin() {
|
||||||
override fun load(context: Context) {
|
override fun load(context: Context) {
|
||||||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||||
registerMainAPI(StremioX())
|
registerMainAPI(StremioX())
|
||||||
registerMainAPI(Stremio())
|
registerMainAPI(StremioC())
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue