diff --git a/legendary/cli.py b/legendary/cli.py index d0d47d0..35836db 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -145,7 +145,7 @@ class LegendaryCLI: # only import here since pywebview import is slow from legendary.utils.webview_login import webview_available, do_webview_login - if not webview_available or args.no_webview: + if not webview_available or args.no_webview or self.core.webview_killswitch: # unfortunately the captcha stuff makes a complete CLI login flow kinda impossible right now... print('Please login via the epic web login!') webbrowser.open( diff --git a/legendary/core.py b/legendary/core.py index 1d525bc..85af238 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -85,6 +85,7 @@ class LegendaryCore: self.update_available = False self.force_show_update = False + self.webview_killswitch = False def auth(self, username, password): """ @@ -265,6 +266,8 @@ class LegendaryCore: for app_name in sdl_config.keys(): if app_name not in sdl_games: sdl_games[app_name] = None + if lgd_config := version_info.get('legendary_config'): + self.webview_killswitch = lgd_config.get('webview_killswitch', False) def get_update_info(self): return self.lgd.get_cached_version()['data'].get('release_info')