diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GithubApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GithubApi.kt index 08b3fdc2..9666dc34 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GithubApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/GithubApi.kt @@ -30,8 +30,8 @@ class GithubApi(index: Int) : InAppAuthAPIManager(index){ } override suspend fun login(data: InAppAuthAPI.LoginData): Boolean { switchToNewAccount() - val username = data.username ?: throw ErrorLoadingException("Requires Username") - val password = data.password ?: throw ErrorLoadingException("Requires Password") + val username = data.username ?: throw IllegalArgumentException ("Requires Username") + val password = data.password ?: throw IllegalArgumentException ("Requires Password") try { setKey(accountId, GITHUB_USER_KEY, GithubOAuthEntity(username, password)) registerAccount() diff --git a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt index bfa65f62..e764f240 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/syncproviders/providers/OpenSubtitlesApi.kt @@ -124,8 +124,8 @@ class OpenSubtitlesApi(index: Int) : InAppAuthAPIManager(index), AbstractSubApi } override suspend fun login(data: InAppAuthAPI.LoginData): Boolean { - val username = data.username ?: throw ErrorLoadingException("Requires Username") - val password = data.password ?: throw ErrorLoadingException("Requires Password") + val username = data.username ?: throw IllegalArgumentException ("Requires Username") + val password = data.password ?: throw IllegalArgumentException ("Requires Password") switchToNewAccount() try { if (initLogin(username, password)) { diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt index cbbe9231..57ca32b4 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/BackupUtils.kt @@ -27,6 +27,8 @@ import com.lagradost.cloudstream3.syncproviders.providers.MALApi.Companion.MAL_S import com.lagradost.cloudstream3.syncproviders.providers.MALApi.Companion.MAL_TOKEN_KEY import com.lagradost.cloudstream3.syncproviders.providers.MALApi.Companion.MAL_UNIXTIME_KEY import com.lagradost.cloudstream3.syncproviders.providers.MALApi.Companion.MAL_USER_KEY +import com.lagradost.cloudstream3.syncproviders.providers.OpenSubtitlesApi +import com.lagradost.cloudstream3.syncproviders.providers.OpenSubtitlesApi.Companion.OPEN_SUBTITLES_USER_KEY import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.BackupUtils.restore @@ -71,7 +73,11 @@ object BackupUtils { // The plugins themselves are not backed up PLUGINS_KEY, - PLUGINS_KEY_LOCAL + PLUGINS_KEY_LOCAL, + + OPEN_SUBTITLES_USER_KEY, + "nginx_user", // Nginx user key + ) /** false if blacklisted key */