mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-11 18:56:13 +00:00
Remove Connect
This commit is contained in:
parent
59c1dd42e3
commit
481ee11301
17 changed files with 7 additions and 508 deletions
|
@ -69,8 +69,6 @@ class ConnectionManager(object):
|
|||
return self.connect
|
||||
elif key == "login":
|
||||
return self.login
|
||||
elif key == "login-connect":
|
||||
return self.login_to_connect
|
||||
elif key == "connect-user":
|
||||
return self.connect_user()
|
||||
elif key == "connect-token":
|
||||
|
@ -159,38 +157,6 @@ class ConnectionManager(object):
|
|||
|
||||
return servers
|
||||
|
||||
def login_to_connect(self, username, password):
|
||||
|
||||
if not username:
|
||||
raise AttributeError("username cannot be empty")
|
||||
|
||||
if not password:
|
||||
raise AttributeError("password cannot be empty")
|
||||
|
||||
try:
|
||||
result = self._request_url({
|
||||
'type': "POST",
|
||||
'url': self.get_connect_url("user/authenticate"),
|
||||
'data': {
|
||||
'nameOrEmail': username,
|
||||
'password': self._get_connect_password_hash(password)
|
||||
},
|
||||
'dataType': "json"
|
||||
})
|
||||
except Exception as error: # Failed to login
|
||||
LOG.error(error)
|
||||
return False
|
||||
else:
|
||||
credentials = self.credentials.get_credentials()
|
||||
credentials['ConnectAccessToken'] = result['AccessToken']
|
||||
credentials['ConnectUserId'] = result['User']['Id']
|
||||
credentials['ConnectUser'] = result['User']['DisplayName']
|
||||
self.credentials.get_credentials(credentials)
|
||||
# Signed in
|
||||
self._on_connect_user_signin(result['User'])
|
||||
|
||||
return result
|
||||
|
||||
def login(self, server, username, password=None, clear=True, options={}):
|
||||
|
||||
if not username:
|
||||
|
|
|
@ -82,7 +82,7 @@ class WSClient(threading.Thread):
|
|||
message = json.loads(message)
|
||||
data = message.get('Data', {})
|
||||
|
||||
if message['MessageType'] in ('RefreshProgress'):
|
||||
if message['MessageType'] in ('RefreshProgress',):
|
||||
LOG.debug("Ignoring %s", message)
|
||||
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue