mirror of
https://github.com/derrod/legendary.git
synced 2026-07-30 01:59:11 +00:00
[core] update entitlements only when there are new assets.
This commit is contained in:
parent
5a61ae604c
commit
9cf6fd21ce
|
|
@ -360,6 +360,11 @@ class LegendaryCore:
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# only get entitlements if there was an asset update
|
||||||
|
if self.lgd.assets != assets or not self.lgd.entitlements:
|
||||||
|
self.log.info('Updating entitlements.')
|
||||||
|
self.lgd.entitlements = self.egs.get_user_entitlements_full()
|
||||||
|
|
||||||
# only save (and write to disk) if there were changes
|
# only save (and write to disk) if there were changes
|
||||||
if self.lgd.assets != assets:
|
if self.lgd.assets != assets:
|
||||||
self.lgd.assets = assets
|
self.lgd.assets = assets
|
||||||
|
|
@ -499,10 +504,6 @@ class LegendaryCore:
|
||||||
elif not any(i['path'] == 'mods' for i in game.metadata.get('categories', [])) and platform in app_assets:
|
elif not any(i['path'] == 'mods' for i in game.metadata.get('categories', [])) and platform in app_assets:
|
||||||
_ret.append(game)
|
_ret.append(game)
|
||||||
|
|
||||||
if meta_updated:
|
|
||||||
self.log.info('Updating entitlements.')
|
|
||||||
self.lgd.entitlements = self.egs.get_user_entitlements_full()
|
|
||||||
|
|
||||||
self.update_aliases(force=meta_updated)
|
self.update_aliases(force=meta_updated)
|
||||||
if meta_updated:
|
if meta_updated:
|
||||||
self._prune_metadata()
|
self._prune_metadata()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue