diff --git a/MaciptvProvider/src/main/kotlin/com/lagradost/MacIptvAPI.kt b/MaciptvProvider/src/main/kotlin/com/lagradost/MacIptvAPI.kt index b3af442..91f1b6f 100644 --- a/MaciptvProvider/src/main/kotlin/com/lagradost/MacIptvAPI.kt +++ b/MaciptvProvider/src/main/kotlin/com/lagradost/MacIptvAPI.kt @@ -30,7 +30,7 @@ class MacIptvAPI(index: Int) : InAppAuthAPIManager(index) { } override suspend fun login(data: InAppAuthAPI.LoginData): Boolean { - if (data.server.isNullOrBlank() || !data.password?.contains("""(([0-9A-Za-z]{2}[:-]){5}[0-9A-Za-z]{2})""".toRegex())!!) return false // we require a server and a mac address + if (data.server.isNullOrBlank() || !data.password?.contains("""(([0-9A-Za-z]{2}[:-]){5}[0-9A-Za-z]{2})""".toRegex())!!) return false // we require a server switchToNewAccount() setKey(accountId, IPTVBOX_USER_KEY, data) registerAccount() @@ -50,6 +50,14 @@ class MacIptvAPI(index: Int) : InAppAuthAPIManager(index) { MacIPTVProvider.overrideUrl = null MacIPTVProvider.loginMac = null MacIPTVProvider.companionName = null + switchToNewAccount() + setKey( + accountId, + IPTVBOX_USER_KEY, + InAppAuthAPI.LoginData("Default Account", null, "none") + ) + registerAccount() + inAppAuths return } MacIPTVProvider.overrideUrl = data.server?.removeSuffix("/")