[core] update entitlements only when there are new assets.

This commit is contained in:
Stelios Tsampas 2026-04-16 00:58:06 +03:00
parent 5a61ae604c
commit 9cf6fd21ce

View file

@ -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
if 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:
_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)
if meta_updated:
self._prune_metadata()