Merge remote-tracking branch 'origin/master'

This commit is contained in:
Blatzar 2022-08-07 18:02:00 +02:00
commit e14b2d24c8
6 changed files with 36 additions and 7 deletions

View file

@ -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

View file

@ -76,6 +76,15 @@
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<intent-filter android:exported="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="https" android:host="cs.repo" android:pathPrefix="/"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

View file

@ -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

View file

@ -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.*
@ -456,6 +458,26 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
initAll()
apis = allProviders
try {
getKey<Array<SettingsGeneral.CustomSite>>(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)

View file

@ -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(

View file

@ -26,10 +26,10 @@
<Preference
android:title="@string/github"
android:icon="@drawable/ic_github_logo"
app:summary="https://github.com/rereleased/release/releases">
app:summary="https://github.com/recloudstream/cloudstream">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/rereleased/release/releases" />
android:data="https://github.com/recloudstream/cloudstream" />
</Preference>
<Preference