diff --git a/.github/workflows/build_to_archive.yml b/.github/workflows/build_to_archive.yml index 30bedcc1b5a..056022d22ef 100644 --- a/.github/workflows/build_to_archive.yml +++ b/.github/workflows/build_to_archive.yml @@ -73,6 +73,8 @@ jobs: SIMKL_CLIENT_SECRET: ${{ secrets.SIMKL_CLIENT_SECRET }} TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }} MDL_API_KEY: ${{ secrets.MDL_API_KEY }} + MAL_KEY: ${{ secrets.MAL_KEY }} + ANILIST_KEY: ${{ secrets.ANILIST_KEY }} - uses: actions/checkout@v6 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index b5b17ba6adb..f089afa8fff 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -64,6 +64,8 @@ jobs: SIMKL_CLIENT_SECRET: ${{ secrets.SIMKL_CLIENT_SECRET }} TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }} MDL_API_KEY: ${{ secrets.MDL_API_KEY }} + MAL_KEY: ${{ secrets.MAL_KEY }} + ANILIST_KEY: ${{ secrets.ANILIST_KEY }} - name: Create pre-release uses: marvinpinto/action-automatic-releases@latest diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 02c1f99e86e..66a55ae8830 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -127,6 +127,16 @@ android { "SIMKL_CLIENT_SECRET", "\"" + (System.getenv("SIMKL_CLIENT_SECRET") ?: localProperties["simkl.secret"]) + "\"" ) + buildConfigField( + "String", + "MAL_KEY", + "\"" + (System.getenv("MAL_KEY") ?: localProperties["mal.key"]) + "\"" + ) + buildConfigField( + "String", + "ANILIST_KEY", + "\"" + (System.getenv("ANILIST_KEY") ?: localProperties["anilist.key"]) + "\"" + ) testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/AniListApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/AniListApi.kt index 7a46b411376..0df8289465e 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/AniListApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/AniListApi.kt @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.Actor import com.lagradost.cloudstream3.ActorData import com.lagradost.cloudstream3.ActorRole +import com.lagradost.cloudstream3.BuildConfig import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey import com.lagradost.cloudstream3.ErrorLoadingException @@ -35,7 +36,7 @@ class AniListApi : SyncAPI() { override var name = "AniList" override val idPrefix = "anilist" - val key = "6871" + private val key = BuildConfig.ANILIST_KEY override val redirectUrlIdentifier = "anilistlogin" override var requireLibraryRefresh = true override val hasOAuth2 = true diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt index ba0195be6b8..399b854e898 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/MALApi.kt @@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.syncproviders.providers import androidx.annotation.StringRes import com.fasterxml.jackson.annotation.JsonProperty +import com.lagradost.cloudstream3.BuildConfig import com.lagradost.cloudstream3.CloudStreamApp.Companion.getKey import com.lagradost.cloudstream3.CloudStreamApp.Companion.setKey import com.lagradost.cloudstream3.R @@ -34,7 +35,7 @@ class MALApi : SyncAPI() { override var name = "MAL" override val idPrefix = "mal" - val key = "1714d6f2f4f7cc19644384f8c4629910" + private val key = BuildConfig.MAL_KEY private val apiUrl = "https://api.myanimelist.net" override val hasOAuth2 = true override val redirectUrlIdentifier: String? = "mallogin" diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TraktProvider.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TraktProvider.kt index 59dcd271111..dafec4d9707 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TraktProvider.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/metaproviders/TraktProvider.kt @@ -47,7 +47,7 @@ open class TraktProvider : MainAPI() { private val traktApiUrl = "https://api.trakt.tv" - val traktClientId: String = BuildConfig.TRAKT_CLIENT_ID + private val traktClientId: String = BuildConfig.TRAKT_CLIENT_ID override val mainPage = mainPageOf( "$traktApiUrl/movies/trending" to "Trending Movies", //Most watched movies right now