parse json upon start

This commit is contained in:
LagradOst 2022-03-16 16:29:11 +01:00
parent e58793b390
commit 0b8e4fad44
81 changed files with 367 additions and 298 deletions

View file

@ -6,6 +6,7 @@ import android.net.Uri
import android.util.Base64.encodeToString import android.util.Base64.encodeToString
import androidx.annotation.WorkerThread import androidx.annotation.WorkerThread
import androidx.preference.PreferenceManager import androidx.preference.PreferenceManager
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.databind.json.JsonMapper
import com.fasterxml.jackson.module.kotlin.KotlinModule import com.fasterxml.jackson.module.kotlin.KotlinModule
@ -31,86 +32,84 @@ object APIHolder {
private const val defProvider = 0 private const val defProvider = 0
val apis = arrayListOf( val allProviders by lazy {
PelisplusProvider(), arrayListOf(
PelisplusHDProvider(), PelisplusProvider(),
PeliSmartProvider(), PelisplusHDProvider(),
GogoanimeProvider(), PeliSmartProvider(),
AllAnimeProvider(), GogoanimeProvider(),
AnimekisaProvider(), AllAnimeProvider(),
//ShiroProvider(), // v2 fucked me AnimekisaProvider(),
AnimeFlickProvider(), //ShiroProvider(), // v2 fucked me
AnimeflvnetProvider(), AnimeFlickProvider(),
AnimeflvnetProvider(),
TenshiProvider(), TenshiProvider(),
WcoProvider(), WcoProvider(),
// MeloMovieProvider(), // Captcha for links // MeloMovieProvider(), // Captcha for links
DubbedAnimeProvider(), DubbedAnimeProvider(),
DoramasYTProvider(), DoramasYTProvider(),
CinecalidadProvider(), CinecalidadProvider(),
CuevanaProvider(), CuevanaProvider(),
EntrepeliculasyseriesProvider(), EntrepeliculasyseriesProvider(),
PelisflixProvider(), PelisflixProvider(),
SeriesflixProvider(), SeriesflixProvider(),
IHaveNoTvProvider(), // Documentaries provider IHaveNoTvProvider(), // Documentaries provider
//LookMovieProvider(), // RECAPTCHA (Please allow up to 5 seconds...) //LookMovieProvider(), // RECAPTCHA (Please allow up to 5 seconds...)
VMoveeProvider(), VMoveeProvider(),
WatchCartoonOnlineProvider(), WatchCartoonOnlineProvider(),
AllMoviesForYouProvider(), AllMoviesForYouProvider(),
ApiMDBProvider(), ApiMDBProvider(),
MonoschinosProvider(), MonoschinosProvider(),
VidEmbedProvider(), VidEmbedProvider(),
VfFilmProvider(), VfFilmProvider(),
VfSerieProvider(), VfSerieProvider(),
FrenchStreamProvider(), FrenchStreamProvider(),
AsianLoadProvider(), AsianLoadProvider(),
BflixProvider("https://bflix.ru","Bflix"), BflixProvider("https://bflix.ru","Bflix"),
BflixProvider("https://fmovies.to","Fmovies.to"), BflixProvider("https://fmovies.to","Fmovies.to"),
BflixProvider("https://sflix.pro","Sflix.pro"), BflixProvider("https://sflix.pro","Sflix.pro"),
SflixProvider("https://sflix.to", "Sflix.to"), SflixProvider("https://sflix.to", "Sflix.to"),
SflixProvider("https://dopebox.to", "Dopebox"), SflixProvider("https://dopebox.to", "Dopebox"),
SflixProvider("https://solarmovie.pe", "Solarmovie"), SflixProvider("https://solarmovie.pe", "Solarmovie"),
//TmdbProvider(), //TmdbProvider(),
FilmanProvider(), FilmanProvider(),
ZoroProvider(), ZoroProvider(),
PinoyMoviePediaProvider(), PinoyMoviePediaProvider(),
PinoyHDXyzProvider(), PinoyHDXyzProvider(),
PinoyMoviesEsProvider(), PinoyMoviesEsProvider(),
TrailersTwoProvider(), TrailersTwoProvider(),
TwoEmbedProvider(), TwoEmbedProvider(),
DramaSeeProvider(), DramaSeeProvider(),
WatchAsianProvider(), WatchAsianProvider(),
KdramaHoodProvider(), KdramaHoodProvider(),
AkwamProvider(), AkwamProvider(),
MyCimaProvider(), MyCimaProvider(),
EgyBestProvider(), EgyBestProvider(),
AnimePaheProvider(), AnimePaheProvider(),
NineAnimeProvider(), NineAnimeProvider(),
AnimeWorldProvider(), AnimeWorldProvider(),
SoaptwoDayProvider(), SoaptwoDayProvider(),
CrossTmdbProvider(), CrossTmdbProvider(),
)
val restrictedApis = arrayListOf( //restricted
// TrailersToProvider(), // be aware that this is fuckery AsiaFlixProvider(),
// NyaaProvider(), // torrents in cs3 is wack //backwards
// ThenosProvider(), // ddos protection and wacked links KawaiifuProvider(), // removed due to cloudflare
AsiaFlixProvider(), HDMProvider(),// removed due to cloudflare
) )
}
private val backwardsCompatibleProviders = arrayListOf( var apis : List<MainAPI> = arrayListOf()
KawaiifuProvider(), // removed due to cloudflare
HDMProvider(),// removed due to cloudflare
)
fun getApiFromName(apiName: String?): MainAPI { fun getApiFromName(apiName: String?): MainAPI {
return getApiFromNameNull(apiName) ?: apis[defProvider] return getApiFromNameNull(apiName) ?: apis[defProvider]
@ -118,15 +117,7 @@ object APIHolder {
fun getApiFromNameNull(apiName: String?): MainAPI? { fun getApiFromNameNull(apiName: String?): MainAPI? {
if (apiName == null) return null if (apiName == null) return null
for (api in apis) { for (api in allProviders) {
if (apiName == api.name)
return api
}
for (api in restrictedApis) {
if (apiName == api.name)
return api
}
for (api in backwardsCompatibleProviders) {
if (apiName == api.name) if (apiName == api.name)
return api return api
} }
@ -281,10 +272,45 @@ object APIHolder {
} }
} }
/*
0 = Site not good
1 = All good
2 = Slow, heavy traffic
3 = restricted, must donate 30 benenes to use
*/
const val PROVIDER_STATUS_KEY = "PROVIDER_STATUS_KEY"
const val PROVIDER_STATUS_URL = "https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/providers.json"
const val PROVIDER_STATUS_BETA_ONLY = 3
const val PROVIDER_STATUS_SLOW = 2
const val PROVIDER_STATUS_OK = 1
const val PROVIDER_STATUS_DOWN = 0
data class ProvidersInfoJson(
@JsonProperty("name") var name: String,
@JsonProperty("url") var url: String,
@JsonProperty("status") var status: Int,
)
/**Every provider will **not** have try catch built in, so handle exceptions when calling these functions*/ /**Every provider will **not** have try catch built in, so handle exceptions when calling these functions*/
abstract class MainAPI { abstract class MainAPI {
open val name = "NONE" companion object {
open val mainUrl = "NONE" var overrideData : HashMap<String, ProvidersInfoJson>? = null
}
public fun overrideWithNewData(data : ProvidersInfoJson) {
this.name = data.name
this.mainUrl = data.url
}
init {
overrideData?.get(this.javaClass.simpleName)?.let { data ->
overrideWithNewData(data)
}
}
open var name = "NONE"
open var mainUrl = "NONE"
//open val uniqueId : Int by lazy { this.name.hashCode() } // in case of duplicate providers you can have a shared id //open val uniqueId : Int by lazy { this.name.hashCode() } // in case of duplicate providers you can have a shared id
@ -317,17 +343,17 @@ abstract class MainAPI {
open val providerType = ProviderType.DirectProvider open val providerType = ProviderType.DirectProvider
@WorkerThread @WorkerThread
suspend open fun getMainPage(): HomePageResponse? { open suspend fun getMainPage(): HomePageResponse? {
throw NotImplementedError() throw NotImplementedError()
} }
@WorkerThread @WorkerThread
suspend open fun search(query: String): List<SearchResponse>? { open suspend fun search(query: String): List<SearchResponse>? {
throw NotImplementedError() throw NotImplementedError()
} }
@WorkerThread @WorkerThread
suspend open fun quickSearch(query: String): List<SearchResponse>? { open suspend fun quickSearch(query: String): List<SearchResponse>? {
throw NotImplementedError() throw NotImplementedError()
} }
@ -336,7 +362,7 @@ abstract class MainAPI {
* Based on data from search() or getMainPage() it generates a LoadResponse, * Based on data from search() or getMainPage() it generates a LoadResponse,
* basically opening the info page from a link. * basically opening the info page from a link.
* */ * */
suspend open fun load(url: String): LoadResponse? { open suspend fun load(url: String): LoadResponse? {
throw NotImplementedError() throw NotImplementedError()
} }
@ -350,13 +376,13 @@ abstract class MainAPI {
* if the need arises. * if the need arises.
* */ * */
@WorkerThread @WorkerThread
suspend open fun extractorVerifierJob(extractorData: String?) { open suspend fun extractorVerifierJob(extractorData: String?) {
throw NotImplementedError() throw NotImplementedError()
} }
/**Callback is fired once a link is found, will return true if method is executed successfully*/ /**Callback is fired once a link is found, will return true if method is executed successfully*/
@WorkerThread @WorkerThread
suspend open fun loadLinks( open suspend fun loadLinks(
data: String, data: String,
isCasting: Boolean, isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,

View file

@ -23,9 +23,9 @@ import androidx.preference.PreferenceManager
import com.google.android.gms.cast.framework.* import com.google.android.gms.cast.framework.*
import com.google.android.material.navigationrail.NavigationRailView import com.google.android.material.navigationrail.NavigationRailView
import com.jaredrummler.android.colorpicker.ColorPickerDialogListener import com.jaredrummler.android.colorpicker.ColorPickerDialogListener
import com.lagradost.cloudstream3.APIHolder.allProviders
import com.lagradost.cloudstream3.APIHolder.apis import com.lagradost.cloudstream3.APIHolder.apis
import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings
import com.lagradost.cloudstream3.APIHolder.restrictedApis
import com.lagradost.cloudstream3.CommonActivity.backEvent import com.lagradost.cloudstream3.CommonActivity.backEvent
import com.lagradost.cloudstream3.CommonActivity.loadThemes import com.lagradost.cloudstream3.CommonActivity.loadThemes
import com.lagradost.cloudstream3.CommonActivity.onColorSelectedEvent import com.lagradost.cloudstream3.CommonActivity.onColorSelectedEvent
@ -46,9 +46,12 @@ import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSet
import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable
import com.lagradost.cloudstream3.utils.AppUtils.loadCache import com.lagradost.cloudstream3.utils.AppUtils.loadCache
import com.lagradost.cloudstream3.utils.AppUtils.loadResult import com.lagradost.cloudstream3.utils.AppUtils.loadResult
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.BackupUtils.setUpBackup import com.lagradost.cloudstream3.utils.BackupUtils.setUpBackup
import com.lagradost.cloudstream3.utils.Coroutines.main
import com.lagradost.cloudstream3.utils.DataStore.getKey import com.lagradost.cloudstream3.utils.DataStore.getKey
import com.lagradost.cloudstream3.utils.DataStore.removeKey import com.lagradost.cloudstream3.utils.DataStore.removeKey
import com.lagradost.cloudstream3.utils.DataStore.setKey
import com.lagradost.cloudstream3.utils.DataStoreHelper.setViewPos import com.lagradost.cloudstream3.utils.DataStoreHelper.setViewPos
import com.lagradost.cloudstream3.utils.InAppUpdater.Companion.runAutoUpdate import com.lagradost.cloudstream3.utils.InAppUpdater.Companion.runAutoUpdate
import com.lagradost.cloudstream3.utils.UIHelper.changeStatusBarState import com.lagradost.cloudstream3.utils.UIHelper.changeStatusBarState
@ -60,6 +63,9 @@ import com.lagradost.cloudstream3.utils.UIHelper.navigate
import com.lagradost.cloudstream3.utils.UIHelper.requestRW import com.lagradost.cloudstream3.utils.UIHelper.requestRW
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_result_swipe.* import kotlinx.android.synthetic.main.fragment_result_swipe.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import java.io.File import java.io.File
import kotlin.concurrent.thread import kotlin.concurrent.thread
@ -308,6 +314,70 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
for (api in OAuth2accountApis) { for (api in OAuth2accountApis) {
api.init() api.init()
} }
// must give benenes to get beta providers
val hasBenene = try {
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
val count = settingsManager.getInt(getString(R.string.benene_count), 0)
count > 30
} catch (e: Exception) {
e.printStackTrace()
false
}
// this pulls the latest data so ppl don't have to update to simply change provider url
try {
runBlocking {
withContext(Dispatchers.IO) {
val cacheStr: String? = getKey(PROVIDER_STATUS_KEY)
val cache : HashMap<String, ProvidersInfoJson>? = cacheStr?.let { tryParseJson(cacheStr) }
if (cache != null) {
// if cache is found then spin up a new request, but dont wait
main {
try {
val txt = app.get(PROVIDER_STATUS_URL).text
val newCache = tryParseJson<HashMap<String, ProvidersInfoJson>>(txt)
setKey(PROVIDER_STATUS_KEY, txt)
MainAPI.overrideData = newCache // update all new providers
for (api in apis) { // update current providers
newCache?.get(api.javaClass.simpleName)?.let { data ->
api.overrideWithNewData(data)
}
}
} catch (e : Exception) {
logError(e)
}
}
cache
} else {
// if it is the first time the user has used the app then wait for a request to update all providers
val txt = app.get(PROVIDER_STATUS_URL).text
setKey(PROVIDER_STATUS_KEY, txt)
val newCache = tryParseJson<HashMap<String, ProvidersInfoJson>>(txt)
newCache
}?.let { providersJsonMap ->
MainAPI.overrideData = providersJsonMap
val acceptableProviders =
providersJsonMap.filter { it.value.status == PROVIDER_STATUS_OK || it.value.status == PROVIDER_STATUS_SLOW }
.map { it.key }.toSet()
val restrictedApis =
if (hasBenene) providersJsonMap.filter { it.value.status == PROVIDER_STATUS_BETA_ONLY }
.map { it.key }.toSet() else emptySet()
apis = allProviders.filter { api ->
val name = api.javaClass.simpleName
acceptableProviders.contains(name) || restrictedApis.contains(name)
}
}
}
}
} catch (e: Exception) {
apis = allProviders
e.printStackTrace()
logError(e)
}
loadThemes(this) loadThemes(this)
updateLocale() updateLocale()
app.initClient(this) app.initClient(this)
@ -458,10 +528,8 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
createISO() createISO()
}*/ }*/
var providersString = "Current providers are:\n"
var providersAndroidManifestString = "Current androidmanifest should be:\n" var providersAndroidManifestString = "Current androidmanifest should be:\n"
for (api in apis) { for (api in allProviders) {
providersString += "+ ${api.mainUrl}\n"
providersAndroidManifestString += "<data android:scheme=\"https\" android:host=\"${ providersAndroidManifestString += "<data android:scheme=\"https\" android:host=\"${
api.mainUrl.removePrefix( api.mainUrl.removePrefix(
"https://" "https://"
@ -469,17 +537,6 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
}\" android:pathPrefix=\"/\"/>\n" }\" android:pathPrefix=\"/\"/>\n"
} }
for (api in restrictedApis) {
providersString += "+ ${api.mainUrl}\n"
providersAndroidManifestString += "<data android:scheme=\"https\" android:host=\"${
api.mainUrl.removePrefix(
"https://"
)
}\" android:pathPrefix=\"/\"/>\n"
}
println(providersString)
println(providersAndroidManifestString) println(providersAndroidManifestString)
handleAppIntent(intent) handleAppIntent(intent)
@ -488,15 +545,6 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
runAutoUpdate() runAutoUpdate()
} }
// must give benenes to get beta providers
try {
val settingsManager = PreferenceManager.getDefaultSharedPreferences(this)
val count = settingsManager.getInt(getString(R.string.benene_count), 0)
if (count > 30 && restrictedApis.size > 0 && !apis.contains(restrictedApis.first()))
apis.addAll(restrictedApis)
} catch (e: Exception) {
e.printStackTrace()
}
APIRepository.dubStatusActive = getApiDubstatusSettings() APIRepository.dubStatusActive = getApiDubstatusSettings()
try { try {
@ -507,7 +555,7 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
} catch (e: Exception) { } catch (e: Exception) {
logError(e) logError(e)
} }
println("Loaded everything")
/* /*
val relativePath = (Environment.DIRECTORY_DOWNLOADS) + File.separatorChar val relativePath = (Environment.DIRECTORY_DOWNLOADS) + File.separatorChar
val displayName = "output.dex" //""output.dex" val displayName = "output.dex" //""output.dex"

View file

@ -17,8 +17,8 @@ import java.util.*
class AllAnimeProvider : MainAPI() { class AllAnimeProvider : MainAPI() {
override val mainUrl = "https://allanime.site" override var mainUrl = "https://allanime.site"
override val name = "AllAnime" override var name = "AllAnime"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = false override val hasMainPage = false

View file

@ -16,8 +16,8 @@ class AnimeFlickProvider : MainAPI() {
} }
} }
override val mainUrl = "https://animeflick.net" override var mainUrl = "https://animeflick.net"
override val name = "AnimeFlick" override var name = "AnimeFlick"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = false override val hasMainPage = false

View file

@ -44,8 +44,8 @@ class AnimePaheProvider : MainAPI() {
Regex("""(^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be/|youtube(?:-nocookie)?\.(?:[A-Za-z]{2,4}|[A-Za-z]{2,3}\.[A-Za-z]{2})/)(?:watch|embed/|vi?/)*(?:\?[\w=&]*vi?=)?[^#&?/]{11}.*${'$'})""") Regex("""(^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be/|youtube(?:-nocookie)?\.(?:[A-Za-z]{2,4}|[A-Za-z]{2,3}\.[A-Za-z]{2})/)(?:watch|embed/|vi?/)*(?:\?[\w=&]*vi?=)?[^#&?/]{11}.*${'$'})""")
} }
override val mainUrl = MAIN_URL override var mainUrl = MAIN_URL
override val name = "AnimePahe" override var name = "AnimePahe"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
class AnimeWorldProvider : MainAPI() { class AnimeWorldProvider : MainAPI() {
override val mainUrl = "https://www.animeworld.tv" override var mainUrl = "https://www.animeworld.tv"
override val name = "AnimeWorld" override var name = "AnimeWorld"
override val lang = "it" override val lang = "it"
override val hasMainPage = true override val hasMainPage = true

View file

@ -14,8 +14,8 @@ class AnimeflvnetProvider:MainAPI() {
else TvType.Anime else TvType.Anime
} }
} }
override val mainUrl = "https://www3.animeflv.net" override var mainUrl = "https://www3.animeflv.net"
override val name = "Animeflv.net" override var name = "Animeflv.net"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -12,8 +12,8 @@ import kotlin.collections.ArrayList
class AnimekisaProvider : MainAPI() { class AnimekisaProvider : MainAPI() {
override val mainUrl = "https://animekisa.in" override var mainUrl = "https://animekisa.in"
override val name = "Animekisa" override var name = "Animekisa"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
override val hasDownloadSupport = true override val hasDownloadSupport = true

View file

@ -11,8 +11,8 @@ import org.jsoup.Jsoup
import java.util.* import java.util.*
class DubbedAnimeProvider : MainAPI() { class DubbedAnimeProvider : MainAPI() {
override val mainUrl = "https://bestdubbedanime.com" override var mainUrl = "https://bestdubbedanime.com"
override val name = "DubbedAnime" override var name = "DubbedAnime"
override val hasQuickSearch = true override val hasQuickSearch = true
override val hasMainPage = true override val hasMainPage = true

View file

@ -56,8 +56,8 @@ class GogoanimeProvider : MainAPI() {
.toByteArray() .toByteArray()
} }
override val mainUrl = "https://gogoanime.film" override var mainUrl = "https://gogoanime.film"
override val name = "GogoAnime" override var name = "GogoAnime"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true

View file

@ -7,8 +7,8 @@ import org.jsoup.Jsoup
import java.util.* import java.util.*
class KawaiifuProvider : MainAPI() { class KawaiifuProvider : MainAPI() {
override val mainUrl = "https://kawaiifu.com" override var mainUrl = "https://kawaiifu.com"
override val name = "Kawaiifu" override var name = "Kawaiifu"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true

View file

@ -17,8 +17,8 @@ class MonoschinosProvider : MainAPI() {
} }
} }
override val mainUrl = "https://monoschinos2.com" override var mainUrl = "https://monoschinos2.com"
override val name = "Monoschinos" override var name = "Monoschinos"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -10,8 +10,8 @@ import org.jsoup.Jsoup
import java.util.* import java.util.*
class NineAnimeProvider : MainAPI() { class NineAnimeProvider : MainAPI() {
override val mainUrl = "https://9anime.center" override var mainUrl = "https://9anime.center"
override val name = "9Anime" override var name = "9Anime"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
override val hasDownloadSupport = true override val hasDownloadSupport = true

View file

@ -25,8 +25,8 @@ class TenshiProvider : MainAPI() {
} }
} }
override val mainUrl = "https://tenshi.moe" override var mainUrl = "https://tenshi.moe"
override val name = "Tenshi.moe" override var name = "Tenshi.moe"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA) override val supportedTypes = setOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)

View file

@ -12,8 +12,8 @@ import java.util.*
class WatchCartoonOnlineProvider : MainAPI() { class WatchCartoonOnlineProvider : MainAPI() {
override val name = "WatchCartoonOnline" override var name = "WatchCartoonOnline"
override val mainUrl = "https://www.wcostream.com" override var mainUrl = "https://www.wcostream.com"
override val supportedTypes = setOf( override val supportedTypes = setOf(
TvType.Cartoon, TvType.Cartoon,

View file

@ -19,8 +19,8 @@ class WcoProvider : MainAPI() {
} }
} }
override val mainUrl = "https://wcostream.cc" override var mainUrl = "https://wcostream.cc"
override val name = "WCO Stream" override var name = "WCO Stream"
override val hasQuickSearch = true override val hasQuickSearch = true
override val hasMainPage = true override val hasMainPage = true

View file

@ -18,8 +18,8 @@ import java.net.URI
import java.util.* import java.util.*
class ZoroProvider : MainAPI() { class ZoroProvider : MainAPI() {
override val mainUrl = "https://zoro.to" override var mainUrl = "https://zoro.to"
override val name = "Zoro" override var name = "Zoro"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -5,8 +5,8 @@ import com.lagradost.cloudstream3.utils.*
import java.net.URI import java.net.URI
class AsianLoad : ExtractorApi() { class AsianLoad : ExtractorApi() {
override val name = "AsianLoad" override var name = "AsianLoad"
override val mainUrl = "https://asianembed.io" override var mainUrl = "https://asianembed.io"
override val requiresReferer = true override val requiresReferer = true
private val sourceRegex = Regex("""sources:[\W\w]*?file:\s*?["'](.*?)["']""") private val sourceRegex = Regex("""sources:[\W\w]*?file:\s*?["'](.*?)["']""")

View file

@ -7,21 +7,21 @@ import com.lagradost.cloudstream3.utils.Qualities
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
class DoodToExtractor : DoodLaExtractor() { class DoodToExtractor : DoodLaExtractor() {
override val mainUrl = "https://dood.to" override var mainUrl = "https://dood.to"
} }
class DoodSoExtractor : DoodLaExtractor() { class DoodSoExtractor : DoodLaExtractor() {
override val mainUrl = "https://dood.so" override var mainUrl = "https://dood.so"
} }
class DoodWsExtractor : DoodLaExtractor() { class DoodWsExtractor : DoodLaExtractor() {
override val mainUrl = "https://dood.ws" override var mainUrl = "https://dood.ws"
} }
open class DoodLaExtractor : ExtractorApi() { open class DoodLaExtractor : ExtractorApi() {
override val name = "DoodStream" override var name = "DoodStream"
override val mainUrl = "https://dood.la" override var mainUrl = "https://dood.la"
override val requiresReferer = false override val requiresReferer = false
override fun getExtractorUrl(id: String): String { override fun getExtractorUrl(id: String): String {

View file

@ -4,7 +4,7 @@ import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
class Evoload1 : Evoload() { class Evoload1 : Evoload() {
override val mainUrl = "https://evoload.io" override var mainUrl = "https://evoload.io"
} }
open class Evoload : ExtractorApi() { open class Evoload : ExtractorApi() {

View file

@ -12,8 +12,8 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
open class GenericM3U8 : ExtractorApi() { open class GenericM3U8 : ExtractorApi() {
override val name = "Upstream" override var name = "Upstream"
override val mainUrl = "https://upstream.to" override var mainUrl = "https://upstream.to"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.app
open class Jawcloud : ExtractorApi() { open class Jawcloud : ExtractorApi() {
override val name = "Jawcloud" override var name = "Jawcloud"
override val mainUrl = "https://jawcloud.co" override var mainUrl = "https://jawcloud.co"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {

View file

@ -11,8 +11,8 @@ import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
open class Mcloud : ExtractorApi() { open class Mcloud : ExtractorApi() {
override val name = "Mcloud" override var name = "Mcloud"
override val mainUrl = "https://mcloud.to" override var mainUrl = "https://mcloud.to"
override val requiresReferer = true override val requiresReferer = true
val headers = mapOf( val headers = mapOf(
"Host" to "mcloud.to", "Host" to "mcloud.to",

View file

@ -4,8 +4,8 @@ import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
class MixDrop : ExtractorApi() { class MixDrop : ExtractorApi() {
override val name = "MixDrop" override var name = "MixDrop"
override val mainUrl = "https://mixdrop.co" override var mainUrl = "https://mixdrop.co"
private val srcRegex = Regex("""wurl.*?=.*?"(.*?)";""") private val srcRegex = Regex("""wurl.*?=.*?"(.*?)";""")
override val requiresReferer = false override val requiresReferer = false

View file

@ -7,8 +7,8 @@ import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getAndUnpack import com.lagradost.cloudstream3.utils.getAndUnpack
class Mp4Upload : ExtractorApi() { class Mp4Upload : ExtractorApi() {
override val name = "Mp4Upload" override var name = "Mp4Upload"
override val mainUrl = "https://www.mp4upload.com" override var mainUrl = "https://www.mp4upload.com"
private val srcRegex = Regex("""player\.src\("(.*?)"""") private val srcRegex = Regex("""player\.src\("(.*?)"""")
override val requiresReferer = true override val requiresReferer = true

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI import java.net.URI
class MultiQuality : ExtractorApi() { class MultiQuality : ExtractorApi() {
override val name = "MultiQuality" override var name = "MultiQuality"
override val mainUrl = "https://gogo-play.net" override var mainUrl = "https://gogo-play.net"
private val sourceRegex = Regex("""file:\s*['"](.*?)['"],label:\s*['"](.*?)['"]""") private val sourceRegex = Regex("""file:\s*['"](.*?)['"],label:\s*['"](.*?)['"]""")
private val m3u8Regex = Regex(""".*?(\d*).m3u8""") private val m3u8Regex = Regex(""".*?(\d*).m3u8""")
private val urlRegex = Regex("""(.*?)([^/]+$)""") private val urlRegex = Regex("""(.*?)([^/]+$)""")

View file

@ -25,8 +25,8 @@ data class Videos (
) )
open class OkRu : ExtractorApi() { open class OkRu : ExtractorApi() {
override val name = "Okru" override var name = "Okru"
override val mainUrl = "http://ok.ru" override var mainUrl = "http://ok.ru"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.app
open class PlayerVoxzer : ExtractorApi() { open class PlayerVoxzer : ExtractorApi() {
override val name = "Voxzer" override var name = "Voxzer"
override val mainUrl = "https://player.voxzer.org" override var mainUrl = "https://player.voxzer.org"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {

View file

@ -10,16 +10,16 @@ import com.lagradost.cloudstream3.utils.getPostForm
import org.jsoup.Jsoup import org.jsoup.Jsoup
//class SBPlay1 : SBPlay() { //class SBPlay1 : SBPlay() {
// override val mainUrl = "https://sbplay1.com" // override var mainUrl = "https://sbplay1.com"
//} //}
//class SBPlay2 : SBPlay() { //class SBPlay2 : SBPlay() {
// override val mainUrl = "https://sbplay2.com" // override var mainUrl = "https://sbplay2.com"
//} //}
open class SBPlay : ExtractorApi() { open class SBPlay : ExtractorApi() {
override val mainUrl = "https://sbplay.one" override var mainUrl = "https://sbplay.one"
override val name = "SBPlay" override var name = "SBPlay"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {

View file

@ -9,46 +9,46 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
class StreamSB1 : StreamSB() { class StreamSB1 : StreamSB() {
override val mainUrl = "https://sbplay1.com" override var mainUrl = "https://sbplay1.com"
} }
class StreamSB2 : StreamSB() { class StreamSB2 : StreamSB() {
override val mainUrl = "https://sbplay2.com" override var mainUrl = "https://sbplay2.com"
} }
class StreamSB3 : StreamSB() { class StreamSB3 : StreamSB() {
override val mainUrl = "https://sbplay3.com" override var mainUrl = "https://sbplay3.com"
} }
class StreamSB4 : StreamSB() { class StreamSB4 : StreamSB() {
override val mainUrl = "https://cloudemb.com" override var mainUrl = "https://cloudemb.com"
} }
class StreamSB5 : StreamSB() { class StreamSB5 : StreamSB() {
override val mainUrl = "https://sbplay.org" override var mainUrl = "https://sbplay.org"
} }
class StreamSB6 : StreamSB() { class StreamSB6 : StreamSB() {
override val mainUrl = "https://embedsb.com" override var mainUrl = "https://embedsb.com"
} }
class StreamSB7 : StreamSB() { class StreamSB7 : StreamSB() {
override val mainUrl = "https://pelistop.co" override var mainUrl = "https://pelistop.co"
} }
class StreamSB8 : StreamSB() { class StreamSB8 : StreamSB() {
override val mainUrl = "https://streamsb.net" override var mainUrl = "https://streamsb.net"
} }
class StreamSB9 : StreamSB() { class StreamSB9 : StreamSB() {
override val mainUrl = "https://sbplay.one" override var mainUrl = "https://sbplay.one"
} }
// This is a modified version of https://github.com/jmir1/aniyomi-extensions/blob/master/src/en/genoanime/src/eu/kanade/tachiyomi/animeextension/en/genoanime/extractors/StreamSBExtractor.kt // This is a modified version of https://github.com/jmir1/aniyomi-extensions/blob/master/src/en/genoanime/src/eu/kanade/tachiyomi/animeextension/en/genoanime/extractors/StreamSBExtractor.kt
// The following code is under the Apache License 2.0 https://github.com/jmir1/aniyomi-extensions/blob/master/LICENSE // The following code is under the Apache License 2.0 https://github.com/jmir1/aniyomi-extensions/blob/master/LICENSE
open class StreamSB : ExtractorApi() { open class StreamSB : ExtractorApi() {
override val name = "StreamSB" override var name = "StreamSB"
override val mainUrl = "https://watchsb.com" override var mainUrl = "https://watchsb.com"
override val requiresReferer = false override val requiresReferer = false
private val hexArray = "0123456789ABCDEF".toCharArray() private val hexArray = "0123456789ABCDEF".toCharArray()

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.Qualities
class StreamTape : ExtractorApi() { class StreamTape : ExtractorApi() {
override val name = "StreamTape" override var name = "StreamTape"
override val mainUrl = "https://streamtape.com" override var mainUrl = "https://streamtape.com"
override val requiresReferer = false override val requiresReferer = false
private val linkRegex = private val linkRegex =

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.Qualities
import java.net.URI import java.net.URI
class Streamhub : ExtractorApi() { class Streamhub : ExtractorApi() {
override val mainUrl = "https://streamhub.to" override var mainUrl = "https://streamhub.to"
override val name = "Streamhub" override var name = "Streamhub"
override val requiresReferer = false override val requiresReferer = false
override fun getExtractorUrl(id: String): String { override fun getExtractorUrl(id: String): String {

View file

@ -1,19 +1,21 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.app
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
class Cinestart: Tomatomatela() { class Cinestart: Tomatomatela() {
override val name: String = "Cinestart" override var name = "Cinestart"
override val mainUrl: String = "https://cinestart.net" override var mainUrl = "https://cinestart.net"
override val details = "vr.php?v=" override val details = "vr.php?v="
} }
open class Tomatomatela : ExtractorApi() { open class Tomatomatela : ExtractorApi() {
override val name = "Tomatomatela" override var name = "Tomatomatela"
override val mainUrl = "https://tomatomatela.com" override var mainUrl = "https://tomatomatela.com"
override val requiresReferer = false override val requiresReferer = false
private data class Tomato ( private data class Tomato (
@JsonProperty("status") val status: Int, @JsonProperty("status") val status: Int,

View file

@ -4,7 +4,7 @@ import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
class Uqload1 : Uqload() { class Uqload1 : Uqload() {
override val mainUrl = "https://uqload.com" override var mainUrl = "https://uqload.com"
} }
open class Uqload : ExtractorApi() { open class Uqload : ExtractorApi() {

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
open class WatchSB : ExtractorApi() { open class WatchSB : ExtractorApi() {
override val name = "WatchSB" override var name = "WatchSB"
override val mainUrl = "https://watchsb.com" override var mainUrl = "https://watchsb.com"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {

View file

@ -8,19 +8,19 @@ import com.lagradost.cloudstream3.mapper
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
class Vidstreamz : WcoStream() { class Vidstreamz : WcoStream() {
override val mainUrl: String = "https://vidstreamz.online" override var mainUrl = "https://vidstreamz.online"
} }
class Vizcloud : WcoStream() { class Vizcloud : WcoStream() {
override val mainUrl: String = "https://vizcloud2.ru" override var mainUrl = "https://vizcloud2.ru"
} }
class Vizcloud2 : WcoStream() { class Vizcloud2 : WcoStream() {
override val mainUrl: String = "https://vizcloud2.online" override var mainUrl = "https://vizcloud2.online"
} }
open class WcoStream : ExtractorApi() { open class WcoStream : ExtractorApi() {
override val name = "VidStream" //Cause works for animekisa and wco override var name = "VidStream" //Cause works for animekisa and wco
override val mainUrl = "https://vidstream.pro" override var mainUrl = "https://vidstream.pro"
override val requiresReferer = false override val requiresReferer = false
private val hlsHelper = M3u8Helper() private val hlsHelper = M3u8Helper()

View file

@ -5,23 +5,23 @@ import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
class Zplayer: ZplayerV2() { class Zplayer: ZplayerV2() {
override val name: String = "Zplayer" override var name: String = "Zplayer"
override val mainUrl: String = "https://zplayer.live" override var mainUrl: String = "https://zplayer.live"
} }
class Upstream: ZplayerV2() { class Upstream: ZplayerV2() {
override val name: String = "Upstream" //Here 'cause works override var name: String = "Upstream" //Here 'cause works
override val mainUrl: String = "https://upstream.to" override var mainUrl: String = "https://upstream.to"
} }
class Streamhub2: ZplayerV2() { class Streamhub2: ZplayerV2() {
override val name: String = "Streamhub" //Here 'cause works override var name = "Streamhub" //Here 'cause works
override val mainUrl: String = "https://streamhub.to" override var mainUrl = "https://streamhub.to"
} }
open class ZplayerV2 : ExtractorApi() { open class ZplayerV2 : ExtractorApi() {
override val name = "Zplayer V2" override var name = "Zplayer V2"
override val mainUrl = "https://v2.zplayer.live" override var mainUrl = "https://v2.zplayer.live"
override val requiresReferer = false override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> { override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {

View file

@ -10,7 +10,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
class CrossTmdbProvider : TmdbProvider() { class CrossTmdbProvider : TmdbProvider() {
override val name = "MultiMovie" override var name = "MultiMovie"
override val apiName = "MultiMovie" override val apiName = "MultiMovie"
override val lang = "en" override val lang = "en"
override val useMetaLoadResponse = true override val useMetaLoadResponse = true

View file

@ -9,8 +9,8 @@ import org.jsoup.nodes.Element
class AkwamProvider : MainAPI() { class AkwamProvider : MainAPI() {
override val lang = "ar" override val lang = "ar"
override val mainUrl = "https://akwam.to" override var mainUrl = "https://akwam.to"
override val name = "Akwam" override var name = "Akwam"
override val usesWebView = false override val usesWebView = false
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie, TvType.Anime, TvType.Cartoon) override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie, TvType.Anime, TvType.Cartoon)

View file

@ -19,8 +19,8 @@ class AllMoviesForYouProvider : MainAPI() {
} }
// Fetching movies will not work if this link is outdated. // Fetching movies will not work if this link is outdated.
override val mainUrl = "https://allmoviesforyou.net" override var mainUrl = "https://allmoviesforyou.net"
override val name = "AllMoviesForYou" override var name = "AllMoviesForYou"
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf( override val supportedTypes = setOf(
TvType.Movie, TvType.Movie,

View file

@ -10,8 +10,8 @@ import com.lagradost.cloudstream3.utils.loadExtractor
class ApiMDBProvider : TmdbProvider() { class ApiMDBProvider : TmdbProvider() {
override val apiName = "ApiMDB" override val apiName = "ApiMDB"
override val name = "ApiMDB" override var name = "ApiMDB"
override val mainUrl = "https://v2.apimdb.net" override var mainUrl = "https://v2.apimdb.net"
override val useMetaLoadResponse = true override val useMetaLoadResponse = true
override val instantLinkLoading = false override val instantLinkLoading = false
override val supportedTypes = setOf( override val supportedTypes = setOf(

View file

@ -11,8 +11,8 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI import java.net.URI
class AsiaFlixProvider : MainAPI() { class AsiaFlixProvider : MainAPI() {
override val mainUrl = "https://asiaflix.app" override var mainUrl = "https://asiaflix.app"
override val name = "AsiaFlix" override var name = "AsiaFlix"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = false override val hasChromecastSupport = false

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.TvType
* make the app know what functions to call * make the app know what functions to call
*/ */
class AsianLoadProvider : VidstreamProviderTemplate() { class AsianLoadProvider : VidstreamProviderTemplate() {
override val name = "AsianLoad" override var name = "AsianLoad"
override val mainUrl = "https://asianembed.io" override var mainUrl = "https://asianembed.io"
override val homePageUrlList = listOf( override val homePageUrlList = listOf(
mainUrl, mainUrl,
"$mainUrl/recently-added-raw", "$mainUrl/recently-added-raw",

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.Jsoup import org.jsoup.Jsoup
class BflixProvider(providerUrl: String, providerName: String) : MainAPI() { class BflixProvider(providerUrl: String, providerName: String) : MainAPI() {
override val mainUrl = providerUrl override var mainUrl = providerUrl
override val name = providerName override var name = providerName
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
override val hasDownloadSupport = true override val hasDownloadSupport = true

View file

@ -1,17 +1,14 @@
package com.lagradost.cloudstream3.movieproviders package com.lagradost.cloudstream3.movieproviders
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.Cinestart import com.lagradost.cloudstream3.extractors.Cinestart
import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.ExtractorLink
import java.util.* import com.lagradost.cloudstream3.utils.loadExtractor
class CinecalidadProvider:MainAPI() { class CinecalidadProvider:MainAPI() {
override val mainUrl: String override var mainUrl = "https://cinecalidad.lol"
get() = "https://cinecalidad.lol" override var name = "Cinecalidad"
override val name: String
get() = "Cinecalidad"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -9,8 +9,8 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import java.util.* import java.util.*
class CuevanaProvider:MainAPI() { class CuevanaProvider:MainAPI() {
override val mainUrl = "https://cuevana3.me" override var mainUrl = "https://cuevana3.me"
override val name = "Cuevana" override var name = "Cuevana"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -16,8 +16,8 @@ class DoramasYTProvider : MainAPI() {
} }
} }
override val mainUrl = "https://doramasyt.com" override var mainUrl = "https://doramasyt.com"
override val name = "DoramasYT" override var name = "DoramasYT"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -9,8 +9,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class DramaSeeProvider : MainAPI() { class DramaSeeProvider : MainAPI() {
override val mainUrl = "https://dramasee.net" override var mainUrl = "https://dramasee.net"
override val name = "DramaSee" override var name = "DramaSee"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = false override val hasChromecastSupport = false

View file

@ -8,8 +8,8 @@ import org.jsoup.nodes.Element
class EgyBestProvider : MainAPI() { class EgyBestProvider : MainAPI() {
override val lang = "ar" override val lang = "ar"
override val mainUrl = "https://egy.best" override var mainUrl = "https://egy.best"
override val name = "EgyBest" override var name = "EgyBest"
override val usesWebView = false override val usesWebView = false
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie) override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.utils.*
import java.util.* import java.util.*
class EntrepeliculasyseriesProvider:MainAPI() { class EntrepeliculasyseriesProvider:MainAPI() {
override val mainUrl = "https://entrepeliculasyseries.nu" override var mainUrl = "https://entrepeliculasyseries.nu"
override val name = "EntrePeliculasySeries" override var name = "EntrePeliculasySeries"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -9,8 +9,8 @@ import org.jsoup.Jsoup
import org.jsoup.select.Elements import org.jsoup.select.Elements
class FilmanProvider : MainAPI() { class FilmanProvider : MainAPI() {
override val mainUrl = "https://filman.cc" override var mainUrl = "https://filman.cc"
override val name = "filman.cc" override var name = "filman.cc"
override val lang = "pl" override val lang = "pl"
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf( override val supportedTypes = setOf(

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.utils.Qualities
import org.jsoup.Jsoup import org.jsoup.Jsoup
class HDMProvider : MainAPI() { class HDMProvider : MainAPI() {
override val name = "HD Movies" override var name = "HD Movies"
override val mainUrl = "https://hdm.to" override var mainUrl = "https://hdm.to"
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf( override val supportedTypes = setOf(

View file

@ -7,8 +7,8 @@ import org.jsoup.Jsoup
import java.net.URLEncoder import java.net.URLEncoder
class IHaveNoTvProvider : MainAPI() { class IHaveNoTvProvider : MainAPI() {
override val mainUrl = "https://ihavenotv.com" override var mainUrl = "https://ihavenotv.com"
override val name = "I Have No TV" override var name = "I Have No TV"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true

View file

@ -14,8 +14,8 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.Jsoup import org.jsoup.Jsoup
class KdramaHoodProvider : MainAPI() { class KdramaHoodProvider : MainAPI() {
override val mainUrl = "https://kdramahood.com" override var mainUrl = "https://kdramahood.com"
override val name = "KDramaHood" override var name = "KDramaHood"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = false override val hasChromecastSupport = false

View file

@ -13,8 +13,8 @@ import org.jsoup.Jsoup
//BE AWARE THAT weboas.is is a clone of lookmovie //BE AWARE THAT weboas.is is a clone of lookmovie
class LookMovieProvider : MainAPI() { class LookMovieProvider : MainAPI() {
override val hasQuickSearch = true override val hasQuickSearch = true
override val name = "LookMovie" override var name = "LookMovie"
override val mainUrl = "https://lookmovie.io" override var mainUrl = "https://lookmovie.io"
override val supportedTypes = setOf( override val supportedTypes = setOf(
TvType.Movie, TvType.Movie,

View file

@ -11,8 +11,8 @@ import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class MeloMovieProvider : MainAPI() { class MeloMovieProvider : MainAPI() {
override val name = "MeloMovie" override var name = "MeloMovie"
override val mainUrl = "https://melomovie.com" override var mainUrl = "https://melomovie.com"
override val instantLinkLoading = true override val instantLinkLoading = true
override val hasQuickSearch = true override val hasQuickSearch = true
override val hasChromecastSupport = false // MKV FILES CANT BE PLAYED ON A CHROMECAST override val hasChromecastSupport = false // MKV FILES CANT BE PLAYED ON A CHROMECAST

View file

@ -9,8 +9,8 @@ import org.jsoup.nodes.Element
class MyCimaProvider : MainAPI() { class MyCimaProvider : MainAPI() {
override val lang = "ar" override val lang = "ar"
override val mainUrl = "https://mycima.tv" override var mainUrl = "https://mycima.tv"
override val name = "MyCima" override var name = "MyCima"
override val usesWebView = false override val usesWebView = false
override val hasMainPage = true override val hasMainPage = true
override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie) override val supportedTypes = setOf(TvType.TvSeries, TvType.Movie)

View file

@ -7,8 +7,8 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import kotlin.collections.ArrayList import kotlin.collections.ArrayList
class PeliSmartProvider: MainAPI() { class PeliSmartProvider: MainAPI() {
override val mainUrl = "https://pelismart.com" override var mainUrl = "https://pelismart.com"
override val name = "PeliSmart" override var name = "PeliSmart"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -7,8 +7,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class PelisflixProvider : MainAPI() { class PelisflixProvider : MainAPI() {
override val mainUrl = "https://pelisflix.li" override var mainUrl = "https://pelisflix.li"
override val name = "Pelisflix" override var name = "Pelisflix"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -6,8 +6,8 @@ import org.jsoup.nodes.Element
import java.util.* import java.util.*
class PelisplusHDProvider:MainAPI() { class PelisplusHDProvider:MainAPI() {
override val mainUrl = "https://pelisplushd.net" override var mainUrl = "https://pelisplushd.net"
override val name = "PelisplusHD" override var name = "PelisplusHD"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -7,10 +7,10 @@ import com.lagradost.cloudstream3.TvType
*/ */
class PelisplusProvider : PelisplusProviderTemplate() { class PelisplusProvider : PelisplusProviderTemplate() {
// mainUrl is good to have as a holder for the url to make future changes easier. // mainUrl is good to have as a holder for the url to make future changes easier.
override val mainUrl = "https://pelisplus.icu" override var mainUrl = "https://pelisplus.icu"
// name is for how the provider will be named which is visible in the UI, no real rules for this. // name is for how the provider will be named which is visible in the UI, no real rules for this.
override val name = "Pelisplus" override var name = "Pelisplus"
override val homePageUrlList = listOf( override val homePageUrlList = listOf(
mainUrl, mainUrl,

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class PinoyHDXyzProvider : MainAPI() { class PinoyHDXyzProvider : MainAPI() {
override val name = "Pinoy-HD" override var name = "Pinoy-HD"
override val mainUrl = "https://www.pinoy-hd.xyz" override var mainUrl = "https://www.pinoy-hd.xyz"
override val lang = "tl" override val lang = "tl"
override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries)
override val hasDownloadSupport = true override val hasDownloadSupport = true

View file

@ -9,8 +9,8 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import java.lang.Exception import java.lang.Exception
class PinoyMoviePediaProvider : MainAPI() { class PinoyMoviePediaProvider : MainAPI() {
override val name = "Pinoy Moviepedia" override var name = "Pinoy Moviepedia"
override val mainUrl = "https://pinoymoviepedia.ru" override var mainUrl = "https://pinoymoviepedia.ru"
override val lang = "tl" override val lang = "tl"
override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries)
override val hasDownloadSupport = true override val hasDownloadSupport = true

View file

@ -13,8 +13,8 @@ import org.jsoup.select.Elements
import java.lang.Exception import java.lang.Exception
class PinoyMoviesEsProvider : MainAPI() { class PinoyMoviesEsProvider : MainAPI() {
override val name = "Pinoy Movies" override var name = "Pinoy Movies"
override val mainUrl = "https://pinoymovies.es" override var mainUrl = "https://pinoymovies.es"
override val lang = "tl" override val lang = "tl"
override val supportedTypes = setOf(TvType.Movie) override val supportedTypes = setOf(TvType.Movie)
override val hasDownloadSupport = false override val hasDownloadSupport = false

View file

@ -7,8 +7,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class SeriesflixProvider : MainAPI() { class SeriesflixProvider : MainAPI() {
override val mainUrl = "https://seriesflix.video" override var mainUrl = "https://seriesflix.video"
override val name = "Seriesflix" override var name = "Seriesflix"
override val lang = "es" override val lang = "es"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -22,8 +22,8 @@ import java.net.URI
import kotlin.system.measureTimeMillis import kotlin.system.measureTimeMillis
class SflixProvider(providerUrl: String, providerName: String) : MainAPI() { class SflixProvider(providerUrl: String, providerName: String) : MainAPI() {
override val mainUrl = providerUrl override var mainUrl = providerUrl
override val name = providerName override var name = providerName
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import java.util.* import java.util.*
class SoaptwoDayProvider:MainAPI() { class SoaptwoDayProvider:MainAPI() {
override val mainUrl = "https://secretlink.xyz" //Probably a rip off, but it has no captcha override var mainUrl = "https://secretlink.xyz" //Probably a rip off, but it has no captcha
override val name = "Soap2Day" override var name = "Soap2Day"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
override val hasDownloadSupport = true override val hasDownloadSupport = true

View file

@ -12,8 +12,8 @@ import com.lagradost.cloudstream3.utils.SubtitleHelper
class TrailersTwoProvider : TmdbProvider() { class TrailersTwoProvider : TmdbProvider() {
val user = "cloudstream" val user = "cloudstream"
override val apiName = "Trailers.to" override val apiName = "Trailers.to"
override val name = "Trailers.to" override var name = "Trailers.to"
override val mainUrl = "https://trailers.to" override var mainUrl = "https://trailers.to"
override val useMetaLoadResponse = true override val useMetaLoadResponse = true
override val instantLinkLoading = true override val instantLinkLoading = true

View file

@ -12,8 +12,8 @@ import com.lagradost.cloudstream3.utils.loadExtractor
class TwoEmbedProvider : TmdbProvider() { class TwoEmbedProvider : TmdbProvider() {
override val apiName = "2Embed" override val apiName = "2Embed"
override val name = "2Embed" override var name = "2Embed"
override val mainUrl = "https://www.2embed.ru" override var mainUrl = "https://www.2embed.ru"
override val useMetaLoadResponse = true override val useMetaLoadResponse = true
override val instantLinkLoading = false override val instantLinkLoading = false
override val supportedTypes = setOf( override val supportedTypes = setOf(

View file

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.getQualityFromName
import org.jsoup.Jsoup import org.jsoup.Jsoup
class VMoveeProvider : MainAPI() { class VMoveeProvider : MainAPI() {
override val name = "VMovee" override var name = "VMovee"
override val mainUrl = "https://www.vmovee.watch" override var mainUrl = "https://www.vmovee.watch"
override val supportedTypes = setOf(TvType.Movie) override val supportedTypes = setOf(TvType.Movie)

View file

@ -7,8 +7,8 @@ import org.jsoup.Jsoup
// referer = https://vf-film.org, USERAGENT ALSO REQUIRED // referer = https://vf-film.org, USERAGENT ALSO REQUIRED
class VfFilmProvider : MainAPI() { class VfFilmProvider : MainAPI() {
override val mainUrl = "https://vf-film.me" override var mainUrl = "https://vf-film.me"
override val name = "vf-film.me" override var name = "vf-film.me"
override val lang = "fr" override val lang = "fr"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = false override val hasMainPage = false

View file

@ -7,8 +7,8 @@ import org.jsoup.Jsoup
// referer = https://vf-serie.org, USERAGENT ALSO REQUIRED // referer = https://vf-serie.org, USERAGENT ALSO REQUIRED
class VfSerieProvider : MainAPI() { class VfSerieProvider : MainAPI() {
override val mainUrl = "https://vf-serie.org" override var mainUrl = "https://vf-serie.org"
override val name = "vf-serie.org" override var name = "vf-serie.org"
override val lang = "fr" override val lang = "fr"
override val hasQuickSearch = false override val hasQuickSearch = false

View file

@ -7,10 +7,10 @@ import com.lagradost.cloudstream3.TvType
*/ */
class VidEmbedProvider : VidstreamProviderTemplate() { class VidEmbedProvider : VidstreamProviderTemplate() {
// mainUrl is good to have as a holder for the url to make future changes easier. // mainUrl is good to have as a holder for the url to make future changes easier.
override val mainUrl = "https://vidembed.cc" override var mainUrl = "https://vidembed.cc"
// name is for how the provider will be named which is visible in the UI, no real rules for this. // name is for how the provider will be named which is visible in the UI, no real rules for this.
override val name = "VidEmbed" override var name = "VidEmbed"
override val homePageUrlList: List<String> = listOf( override val homePageUrlList: List<String> = listOf(
mainUrl, mainUrl,

View file

@ -9,8 +9,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class WatchAsianProvider : MainAPI() { class WatchAsianProvider : MainAPI() {
override val mainUrl = "https://watchasian.sh" override var mainUrl = "https://watchasian.sh"
override val name = "WatchAsian" override var name = "WatchAsian"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = false override val hasChromecastSupport = false

View file

@ -6,8 +6,8 @@ import com.lagradost.cloudstream3.utils.extractorApis
class FrenchStreamProvider : MainAPI() { class FrenchStreamProvider : MainAPI() {
override val mainUrl = "https://french-stream.re" override var mainUrl = "https://french-stream.re"
override val name = "French Stream" override var name = "French Stream"
override val hasQuickSearch = false override val hasQuickSearch = false
override val hasMainPage = true override val hasMainPage = true
override val lang = "fr" override val lang = "fr"

View file

@ -26,11 +26,11 @@ import java.net.URL
import java.util.* import java.util.*
class AniListApi(index: Int) : AccountManager(index), SyncAPI { class AniListApi(index: Int) : AccountManager(index), SyncAPI {
override val name = "AniList" override var name = "AniList"
override val key = "6871" override val key = "6871"
override val redirectUrl = "anilistlogin" override val redirectUrl = "anilistlogin"
override val idPrefix = "anilist" override val idPrefix = "anilist"
override val mainUrl = "https://anilist.co" override var mainUrl = "https://anilist.co"
override val icon = R.drawable.ic_anilist_icon override val icon = R.drawable.ic_anilist_icon
override fun loginInfo(): OAuth2API.LoginInfo? { override fun loginInfo(): OAuth2API.LoginInfo? {

View file

@ -5,7 +5,7 @@ import com.lagradost.cloudstream3.syncproviders.OAuth2API
//TODO dropbox sync //TODO dropbox sync
class Dropbox : OAuth2API { class Dropbox : OAuth2API {
override val idPrefix = "dropbox" override val idPrefix = "dropbox"
override val name = "Dropbox" override var name = "Dropbox"
override val key = "zlqsamadlwydvb2" override val key = "zlqsamadlwydvb2"
override val redirectUrl = "dropboxlogin" override val redirectUrl = "dropboxlogin"

View file

@ -31,11 +31,11 @@ import java.util.*
const val MAL_MAX_SEARCH_LIMIT = 25 const val MAL_MAX_SEARCH_LIMIT = 25
class MALApi(index: Int) : AccountManager(index), SyncAPI { class MALApi(index: Int) : AccountManager(index), SyncAPI {
override val name = "MAL" override var name = "MAL"
override val key = "1714d6f2f4f7cc19644384f8c4629910" override val key = "1714d6f2f4f7cc19644384f8c4629910"
override val redirectUrl = "mallogin" override val redirectUrl = "mallogin"
override val idPrefix = "mal" override val idPrefix = "mal"
override val mainUrl = "https://myanimelist.net" override var mainUrl = "https://myanimelist.net"
override val icon = R.drawable.mal_logo override val icon = R.drawable.mal_logo
override fun logOut() { override fun logOut() {

View file

@ -6,10 +6,10 @@ import com.lagradost.cloudstream3.utils.Qualities
import org.jsoup.Jsoup import org.jsoup.Jsoup
class NyaaProvider : MainAPI() { class NyaaProvider : MainAPI() {
override val name = "Nyaa" override var name = "Nyaa"
override val hasChromecastSupport = false override val hasChromecastSupport = false
override val mainUrl = "https://nyaa.si" override var mainUrl = "https://nyaa.si"
override val supportedTypes = setOf(TvType.Torrent) override val supportedTypes = setOf(TvType.Torrent)
override val vpnStatus = VPNStatus.Torrent override val vpnStatus = VPNStatus.Torrent
override val instantLinkLoading = true override val instantLinkLoading = true

View file

@ -11,11 +11,11 @@ class APIRepository(val api: MainAPI) {
var dubStatusActive = HashSet<DubStatus>() var dubStatusActive = HashSet<DubStatus>()
val noneApi = object : MainAPI() { val noneApi = object : MainAPI() {
override val name = "None" override var name = "None"
override val supportedTypes = emptySet<TvType>() override val supportedTypes = emptySet<TvType>()
} }
val randomApi = object : MainAPI() { val randomApi = object : MainAPI() {
override val name = "Random" override var name = "Random"
override val supportedTypes = emptySet<TvType>() override val supportedTypes = emptySet<TvType>()
} }

View file

@ -22,7 +22,6 @@ import com.hippo.unifile.UniFile
import com.lagradost.cloudstream3.APIHolder.apis import com.lagradost.cloudstream3.APIHolder.apis
import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings import com.lagradost.cloudstream3.APIHolder.getApiDubstatusSettings
import com.lagradost.cloudstream3.APIHolder.getApiProviderLangSettings import com.lagradost.cloudstream3.APIHolder.getApiProviderLangSettings
import com.lagradost.cloudstream3.APIHolder.restrictedApis
import com.lagradost.cloudstream3.AcraApplication import com.lagradost.cloudstream3.AcraApplication
import com.lagradost.cloudstream3.AcraApplication.Companion.removeKey import com.lagradost.cloudstream3.AcraApplication.Companion.removeKey
import com.lagradost.cloudstream3.CommonActivity.setLocale import com.lagradost.cloudstream3.CommonActivity.setLocale
@ -301,9 +300,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
for (api in apis) { for (api in apis) {
allLangs.add(api.lang) allLangs.add(api.lang)
} }
for (api in restrictedApis) {
allLangs.add(api.lang)
}
val currentList = ArrayList<Int>() val currentList = ArrayList<Int>()
for (i in current) { for (i in current) {