From ff8f10c867724719fd71f58ce4f025d285f4a9dc Mon Sep 17 00:00:00 2001 From: C10udburst <18114966+C10udburst@users.noreply.github.com> Date: Sun, 7 Aug 2022 14:14:51 +0200 Subject: [PATCH 1/3] fix provider cloning --- .../lagradost/cloudstream3/MainActivity.kt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt b/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt index 0bbdd358..922d63a2 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt @@ -52,6 +52,7 @@ import com.lagradost.cloudstream3.ui.result.ResultFragment import com.lagradost.cloudstream3.ui.search.SearchResultBuilder import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isEmulatorSettings import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings +import com.lagradost.cloudstream3.ui.settings.SettingsGeneral import com.lagradost.cloudstream3.ui.setup.HAS_DONE_SETUP_KEY import com.lagradost.cloudstream3.utils.AppUtils.isCastApiAvailable import com.lagradost.cloudstream3.utils.AppUtils.loadCache @@ -72,6 +73,7 @@ import com.lagradost.cloudstream3.utils.UIHelper.getResourceColor import com.lagradost.cloudstream3.utils.UIHelper.hideKeyboard import com.lagradost.cloudstream3.utils.UIHelper.navigate import com.lagradost.cloudstream3.utils.UIHelper.requestRW +import com.lagradost.cloudstream3.utils.USER_PROVIDER_API import com.lagradost.nicehttp.Requests import com.lagradost.nicehttp.ResponseParser import kotlinx.android.synthetic.main.activity_main.* @@ -455,6 +457,26 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener { initAll() apis = allProviders + try { + getKey>(USER_PROVIDER_API)?.let { list -> + list.forEach { custom -> + allProviders.firstOrNull { it.javaClass.simpleName == custom.parentJavaClass } + ?.let { + allProviders.add(it.javaClass.newInstance().apply { + name = custom.name + lang = custom.lang + mainUrl = custom.url.trimEnd('/') + canBeOverridden = false + }) + } + } + } + apis = allProviders + APIHolder.apiMap = null + } catch (e: Exception) { + logError(e) + } + loadThemes(this) updateLocale() super.onCreate(savedInstanceState) From 83f31713eb8ccac99ceaa4b75900b652840a2ae3 Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Sun, 7 Aug 2022 14:30:48 +0200 Subject: [PATCH 2/3] another thing i accidentaly removed --- app/src/main/AndroidManifest.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 14ab2c8d..4df7441c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -76,6 +76,15 @@ + + + + + + + + + From 3510208b9059faf4129dc8dba4826c40de97326e Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Sun, 7 Aug 2022 15:09:37 +0200 Subject: [PATCH 3/3] dmca be gone --- .github/ISSUE_TEMPLATE/application-bug.yml | 2 +- app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt | 2 -- .../java/com/lagradost/cloudstream3/utils/InAppUpdater.kt | 4 ++-- app/src/main/res/xml/settins_general.xml | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/application-bug.yml b/.github/ISSUE_TEMPLATE/application-bug.yml index 15a865c9..57608890 100644 --- a/.github/ISSUE_TEMPLATE/application-bug.yml +++ b/.github/ISSUE_TEMPLATE/application-bug.yml @@ -75,7 +75,7 @@ body: required: true - label: I have written a short but informative title. required: true - - label: I have updated the app to pre-release version **[Latest](https://github.com/rereleased/release/releases)**. + - label: I have updated the app to pre-release version **[Latest](https://github.com/recloudstream/cloudstream/releases)**. required: true - label: If related to a provider, I have checked the site and it works, but not the app. required: true diff --git a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt index ca1eb3b6..329ed4ba 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/MainAPI.kt @@ -253,8 +253,6 @@ object APIHolder { 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/reduplicated/Cloudstream/master/docs/providers.json" const val PROVIDER_STATUS_BETA_ONLY = 3 const val PROVIDER_STATUS_SLOW = 2 const val PROVIDER_STATUS_OK = 1 diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt index 59812300..eb5e08bc 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/InAppUpdater.kt @@ -31,8 +31,8 @@ import kotlin.concurrent.thread class InAppUpdater { companion object { - const val GITHUB_USER_NAME = "rereleased" - const val GITHUB_REPO = "release" + const val GITHUB_USER_NAME = "recloudstream" + const val GITHUB_REPO = "cloudstream" // === IN APP UPDATER === data class GithubAsset( diff --git a/app/src/main/res/xml/settins_general.xml b/app/src/main/res/xml/settins_general.xml index 69e6d692..a866bdb7 100644 --- a/app/src/main/res/xml/settins_general.xml +++ b/app/src/main/res/xml/settins_general.xml @@ -26,10 +26,10 @@ + app:summary="https://github.com/recloudstream/cloudstream"> + android:data="https://github.com/recloudstream/cloudstream" />