Update user login

This commit is contained in:
angelblue05 2016-09-05 03:38:57 -05:00
parent 8319f2f0df
commit 644783fae5

View file

@ -139,15 +139,15 @@ class UserClient(threading.Thread):
def _set_user_server(self): def _set_user_server(self):
self._server = self.download("{server}/emby/System/Configuration?format=json")
settings('markPlayed', value=str(self._server['MaxResumePct']))
self._user = self.download("{server}/emby/Users/{UserId}?format=json") self._user = self.download("{server}/emby/Users/{UserId}?format=json")
settings('username', value=self._user['Name']) settings('username', value=self._user['Name'])
if "PrimaryImageTag" in self._user: if "PrimaryImageTag" in self._user:
window('EmbyUserImage', window('EmbyUserImage',
value=artwork.Artwork().getUserArtwork(self._user['Id'], 'Primary')) value=artwork.Artwork().getUserArtwork(self._user['Id'], 'Primary'))
self._server = self.download("{server}/emby/System/Configuration?format=json")
settings('markPlayed', value=str(self._server['MaxResumePct']))
def _authenticate(self): def _authenticate(self):
if not self.get_server() or not self.get_username(): if not self.get_server() or not self.get_username():
@ -223,10 +223,10 @@ class UserClient(threading.Thread):
doutils.startSession() doutils.startSession()
# Set _user and _server # Set _user and _server
self._set_user_server()
# verify user access # verify user access
try: try:
self._set_access() self._set_access()
self._set_user_server()
except Warning: # We don't need to raise any exceptions except Warning: # We don't need to raise any exceptions
pass pass