mirror of
https://github.com/derrod/legendary.git
synced 2024-07-01 04:30:17 +12:00
[core] Avoid recursion in egs_sync
This commit is contained in:
parent
0610b07bf3
commit
3380671b74
|
@ -530,6 +530,9 @@ class LegendaryCore:
|
||||||
def is_installed(self, app_name: str) -> bool:
|
def is_installed(self, app_name: str) -> bool:
|
||||||
return self.get_installed_game(app_name) is not None
|
return self.get_installed_game(app_name) is not None
|
||||||
|
|
||||||
|
def _is_installed(self, app_name: str) -> bool:
|
||||||
|
return self._get_installed_game(app_name) is not None
|
||||||
|
|
||||||
def is_dlc(self, app_name: str) -> bool:
|
def is_dlc(self, app_name: str) -> bool:
|
||||||
meta = self.lgd.get_game_meta(app_name)
|
meta = self.lgd.get_game_meta(app_name)
|
||||||
if not meta:
|
if not meta:
|
||||||
|
@ -986,7 +989,7 @@ class LegendaryCore:
|
||||||
if egl_igame.main_game_appname != egl_igame.app_name: # skip DLC
|
if egl_igame.main_game_appname != egl_igame.app_name: # skip DLC
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not self.is_installed(egl_igame.app_name):
|
if not self._is_installed(egl_igame.app_name):
|
||||||
self.egl_import(egl_igame.app_name)
|
self.egl_import(egl_igame.app_name)
|
||||||
else:
|
else:
|
||||||
lgd_igame = self._get_installed_game(egl_igame.app_name)
|
lgd_igame = self._get_installed_game(egl_igame.app_name)
|
||||||
|
|
Loading…
Reference in a new issue