diff --git a/resources/lib/youtube_plugin/kodion/json_store/access_manager.py b/resources/lib/youtube_plugin/kodion/json_store/access_manager.py index e54b0dc62..f4d152802 100644 --- a/resources/lib/youtube_plugin/kodion/json_store/access_manager.py +++ b/resources/lib/youtube_plugin/kodion/json_store/access_manager.py @@ -111,6 +111,11 @@ def _process_data(data): int(key): value for key, value in users.items() } + current_user = data['access_manager']['current_user'] + try: + data['access_manager']['current_user'] = int(current_user) + except (TypeError, ValueError): + pass return data def get_data(self, process=_process_data.__func__): @@ -216,6 +221,11 @@ def set_user(self, user, switch_to=False): :param switch_to: boolean, change current user :return: """ + try: + user = int(user) + except (TypeError, ValueError): + pass + self._user = user if switch_to: data = {