mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Added a missing file
This commit is contained in:
parent
417b9fb938
commit
e5cde15ad2
1 changed files with 5 additions and 9 deletions
|
@ -24,12 +24,8 @@ class Credentials(object):
|
||||||
def set_credentials(self, credentials):
|
def set_credentials(self, credentials):
|
||||||
self.credentials = credentials
|
self.credentials = credentials
|
||||||
|
|
||||||
def get_credentials(self, data=None):
|
def get_credentials(self):
|
||||||
|
return self.get()
|
||||||
if data is not None:
|
|
||||||
self._set(data)
|
|
||||||
|
|
||||||
return self._get()
|
|
||||||
|
|
||||||
def _ensure(self):
|
def _ensure(self):
|
||||||
|
|
||||||
|
@ -46,12 +42,12 @@ class Credentials(object):
|
||||||
LOG.debug("credentials initialized with: %s", self.credentials)
|
LOG.debug("credentials initialized with: %s", self.credentials)
|
||||||
self.credentials['Servers'] = self.credentials.setdefault('Servers', [])
|
self.credentials['Servers'] = self.credentials.setdefault('Servers', [])
|
||||||
|
|
||||||
def _get(self):
|
def get(self):
|
||||||
self._ensure()
|
self._ensure()
|
||||||
|
|
||||||
return self.credentials
|
return self.credentials
|
||||||
|
|
||||||
def _set(self, data):
|
def set(self, data):
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
self.credentials.update(data)
|
self.credentials.update(data)
|
||||||
|
@ -128,4 +124,4 @@ class Credentials(object):
|
||||||
# Known Kodi/python error
|
# Known Kodi/python error
|
||||||
date_obj = datetime(*(time.strptime(date, "%Y-%m-%dT%H:%M:%SZ")[0:6]))
|
date_obj = datetime(*(time.strptime(date, "%Y-%m-%dT%H:%M:%SZ")[0:6]))
|
||||||
|
|
||||||
return date_obj
|
return date_obj
|
Loading…
Reference in a new issue