mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Add automatically the default account
This commit is contained in:
parent
8a48d77e36
commit
071cd15305
1 changed files with 9 additions and 1 deletions
|
@ -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("/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue