Skip to content

Commit 4d63dcc

Browse files
committed
[core] Warn if app does not have metadata
I forgot why I did this, but I think it works around a crash?
1 parent f1f5cc0 commit 4d63dcc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

legendary/core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,10 @@ def get_game_and_dlc_list(self, update_assets=True, platform='Windows',
446446
def fetch_game_meta(args):
447447
app_name, namespace, catalog_item_id = args
448448
eg_meta = self.egs.get_game_info(namespace, catalog_item_id, timeout=10.0)
449+
if not eg_meta:
450+
self.log.warning(f'App {app_name} does not have any metadata!')
451+
eg_meta = dict(title='Unknown')
452+
449453
game = Game(app_name=app_name, app_title=eg_meta['title'], metadata=eg_meta, asset_infos=assets[app_name])
450454
self.lgd.set_game_meta(game.app_name, game)
451455
games[app_name] = game

0 commit comments

Comments
 (0)