mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[core] Do not delete unused asset information when updating
Previously this would remove asset information for platforms not currently in-use. This change retains those, but doesn't update them if they're not required.
This commit is contained in:
parent
d737ca57a7
commit
8dadf3c1a1
|
@ -373,7 +373,6 @@ class LegendaryCore:
|
||||||
force_refresh=False, skip_ue=True) -> (List[Game], Dict[str, List[Game]]):
|
force_refresh=False, skip_ue=True) -> (List[Game], Dict[str, List[Game]]):
|
||||||
_ret = []
|
_ret = []
|
||||||
_dlc = defaultdict(list)
|
_dlc = defaultdict(list)
|
||||||
assets = {}
|
|
||||||
meta_updated = False
|
meta_updated = False
|
||||||
|
|
||||||
# fetch asset information for Windows, all installed platforms, and the specified one
|
# fetch asset information for Windows, all installed platforms, and the specified one
|
||||||
|
@ -382,11 +381,15 @@ class LegendaryCore:
|
||||||
platforms |= self.get_installed_platforms()
|
platforms |= self.get_installed_platforms()
|
||||||
|
|
||||||
for _platform in platforms:
|
for _platform in platforms:
|
||||||
for ga in self.get_assets(update_assets=update_assets, platform=_platform):
|
self.get_assets(update_assets=update_assets, platform=_platform)
|
||||||
if ga.app_name not in assets:
|
|
||||||
assets[ga.app_name] = {_platform: ga}
|
assets = {}
|
||||||
|
for _platform, _assets in self.lgd.assets.items():
|
||||||
|
for _asset in _assets:
|
||||||
|
if _asset.app_name in assets:
|
||||||
|
assets[_asset.app_name][_platform] = _asset
|
||||||
else:
|
else:
|
||||||
assets[ga.app_name][_platform] = ga
|
assets[_asset.app_name] = {_platform: _asset}
|
||||||
|
|
||||||
fetch_list = []
|
fetch_list = []
|
||||||
games = {}
|
games = {}
|
||||||
|
|
Loading…
Reference in a new issue