From 4d63dcc188affd31ae3a8cbfa3e59e758cb4cc97 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 23 Aug 2024 15:18:59 +0200 Subject: [PATCH] [core] Warn if app does not have metadata I forgot why I did this, but I think it works around a crash? --- legendary/core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legendary/core.py b/legendary/core.py index e175107..5ba55aa 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -446,6 +446,10 @@ class LegendaryCore: def fetch_game_meta(args): app_name, namespace, catalog_item_id = args eg_meta = self.egs.get_game_info(namespace, catalog_item_id, timeout=10.0) + if not eg_meta: + self.log.warning(f'App {app_name} does not have any metadata!') + eg_meta = dict(title='Unknown') + game = Game(app_name=app_name, app_title=eg_meta['title'], metadata=eg_meta, asset_infos=assets[app_name]) self.lgd.set_game_meta(game.app_name, game) games[app_name] = game