updated repo constants

This commit is contained in:
reduplicated 2022-08-04 00:09:00 +02:00
parent 069808ca72
commit d402568d50
5 changed files with 11 additions and 8 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/LagradOst/CloudStream-3/releases)**.
- label: I have updated the app to pre-release version **[Latest](https://github.com/rereleased/release/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

@ -371,7 +371,7 @@ object APIHolder {
*/
const val PROVIDER_STATUS_KEY = "PROVIDER_STATUS_KEY"
const val PROVIDER_STATUS_URL =
"https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/docs/providers.json"
"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

@ -29,7 +29,7 @@ class WcoHelper {
private var newKeys: NewExternalKeys? = null
private suspend fun getKeys() {
keys = keys
?: app.get("https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/docs/keys.json")
?: app.get("https://raw.githubusercontent.com/reduplicated/Cloudstream/master/docs/keys.json")
.parsedSafe<ExternalKeys>()?.also { setKey(BACKUP_KEY_DATA, it) } ?: getKey(
BACKUP_KEY_DATA
)

View file

@ -31,6 +31,9 @@ import kotlin.concurrent.thread
class InAppUpdater {
companion object {
const val GITHUB_USER_NAME = "rereleased"
const val GITHUB_REPO = "release"
// === IN APP UPDATER ===
data class GithubAsset(
@JsonProperty("name") val name: String,
@ -81,7 +84,7 @@ class InAppUpdater {
}
private fun Activity.getReleaseUpdate(): Update {
val url = "https://api.github.com/repos/LagradOst/CloudStream-3/releases"
val url = "https://api.github.com/repos/$GITHUB_USER_NAME/$GITHUB_REPO/releases"
val headers = mapOf("Accept" to "application/vnd.github.v3+json")
val response =
parseJson<List<GithubRelease>>(runBlocking {
@ -148,8 +151,8 @@ class InAppUpdater {
private fun Activity.getPreReleaseUpdate(): Update = runBlocking {
val tagUrl =
"https://api.github.com/repos/LagradOst/CloudStream-3/git/ref/tags/pre-release"
val releaseUrl = "https://api.github.com/repos/LagradOst/CloudStream-3/releases"
"https://api.github.com/repos/$GITHUB_USER_NAME/$GITHUB_REPO/git/ref/tags/pre-release"
val releaseUrl = "https://api.github.com/repos/$GITHUB_USER_NAME/$GITHUB_REPO/releases"
val headers = mapOf("Accept" to "application/vnd.github.v3+json")
val response =
parseJson<List<GithubRelease>>(app.get(releaseUrl, headers = headers).text)

View file

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