diff --git a/Example/build.gradle.kts b/Example/build.gradle.kts new file mode 100644 index 0000000..60386d0 --- /dev/null +++ b/Example/build.gradle.kts @@ -0,0 +1,26 @@ +// use an integer for version numbers +version = 1 + + +cloudstream { + // All of these properties are optional, you can safely remove them + + description = "" + authors = listOf("Jace") + + /** + * Status int as the following: + * 0: Down + * 1: Ok + * 2: Slow + * 3: Beta only + * */ + status = 1 // will be 3 if unspecified + + // List of video source types. Users are able to filter for extensions in a given category. + // You can find a list of avaliable types here: + // https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html + tvTypes = listOf("NSFW") + + iconUrl = "https://www.google.com/s2/favicons?domain=javfree.sh&sz=%size%" +} diff --git a/Example/src/main/AndroidManifest.xml b/Example/src/main/AndroidManifest.xml new file mode 100644 index 0000000..29aec9d --- /dev/null +++ b/Example/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Example/src/main/kotlin/com/jacekun/Example.kt b/Example/src/main/kotlin/com/jacekun/Example.kt new file mode 100644 index 0000000..a90a475 --- /dev/null +++ b/Example/src/main/kotlin/com/jacekun/Example.kt @@ -0,0 +1,45 @@ +package com.jacekun + +import com.fasterxml.jackson.annotation.JsonProperty +import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.mvvm.logError +import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.loadExtractor +import org.jsoup.Jsoup + +class Example : MainAPI() { + private val globalTvType = TvType.Movie + override var name = "Example" + override var mainUrl = "https://" + override val supportedTypes: Set get() = setOf(TvType.NSFW) + override val hasDownloadSupport: Boolean get() = false + override val hasMainPage: Boolean get() = true + override val hasQuickSearch: Boolean get() = false + + override suspend fun getMainPage( + page: Int, + request: MainPageRequest + ): HomePageResponse { + throw NotImplementedError() + } + + override suspend fun search(query: String): List { + throw NotImplementedError() + } + + override suspend fun load(url: String): LoadResponse { + throw NotImplementedError() + } + + override suspend fun loadLinks( + data: String, + isCasting: Boolean, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ): Boolean { + + throw NotImplementedError() + } +} \ No newline at end of file diff --git a/Example/src/main/kotlin/com/jacekun/ExamplePlugin.kt b/Example/src/main/kotlin/com/jacekun/ExamplePlugin.kt new file mode 100644 index 0000000..bdef9af --- /dev/null +++ b/Example/src/main/kotlin/com/jacekun/ExamplePlugin.kt @@ -0,0 +1,13 @@ +package com.jacekun + +import com.lagradost.cloudstream3.plugins.CloudstreamPlugin +import com.lagradost.cloudstream3.plugins.Plugin +import android.content.Context + +@CloudstreamPlugin +class ExamplePlugin: Plugin() { + override fun load(context: Context) { + // All providers should be added in this manner. Please don't edit the providers list directly. + registerMainAPI(Example()) + } +} \ No newline at end of file