self.call_netflix_service({'method': 'switch_profile', 'profile_id': params['profile_id']})
# check login, in case of main menu
if 'action' not in params:
self.call_netflix_service({'method': 'switch_profile', 'profile_id': params['profile_id']})
# check login, in case of main menu
if 'action' not in params:
if 'error' in response:
# check if we do not have a valid session, in case that happens: (re)login
if self._is_expired_session(response=response):
if 'error' in response:
# check if we do not have a valid session, in case that happens: (re)login
if self._is_expired_session(response=response):
if self.establish_session(account=self.kodi_helper.get_credentials()):
return True
message = response['message'] if 'message' in response else ''
if self.establish_session(account=self.kodi_helper.get_credentials()):
return True
message = response['message'] if 'message' in response else ''