mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli/core] Add WebView killswitch to Legendary update data
In case epic breaks it, this at least lets us disable it remotely.
This commit is contained in:
parent
b78b4f49c1
commit
b857967dfa
|
@ -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(
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue