[core] Return empty asset list if not authenticated

Fixes #106
This commit is contained in:
derrod 2020-11-02 15:26:10 +01:00
parent 3ea394937b
commit e97941327e

View file

@ -197,6 +197,9 @@ class LegendaryCore:
self.egs.get_game_assets(platform=platform_override)]
if not self.lgd.assets or update_assets:
# if not logged in, return empty list
if not self.egs.user:
return []
self.lgd.assets = [GameAsset.from_egs_json(a) for a in self.egs.get_game_assets()]
return self.lgd.assets