mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06: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):
|
||||
self.credentials = credentials
|
||||
|
||||
def get_credentials(self, data=None):
|
||||
|
||||
if data is not None:
|
||||
self._set(data)
|
||||
|
||||
return self._get()
|
||||
def get_credentials(self):
|
||||
return self.get()
|
||||
|
||||
def _ensure(self):
|
||||
|
||||
|
@ -46,12 +42,12 @@ class Credentials(object):
|
|||
LOG.debug("credentials initialized with: %s", self.credentials)
|
||||
self.credentials['Servers'] = self.credentials.setdefault('Servers', [])
|
||||
|
||||
def _get(self):
|
||||
def get(self):
|
||||
self._ensure()
|
||||
|
||||
return self.credentials
|
||||
|
||||
def _set(self, data):
|
||||
def set(self, data):
|
||||
|
||||
if data:
|
||||
self.credentials.update(data)
|
||||
|
@ -128,4 +124,4 @@ class Credentials(object):
|
|||
# Known Kodi/python error
|
||||
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