diff --git a/dailyreleases/parsing.py b/dailyreleases/parsing.py index b5a49cb..6a4635d 100644 --- a/dailyreleases/parsing.py +++ b/dailyreleases/parsing.py @@ -188,7 +188,11 @@ def parse_dirname(dirname: str, nfo_link: str) -> Optional[Release]: # If one of the store links we found is to Steam, use their API to get (better) information about the game. if "Steam" in store_links: - steam.update_info(store_links["Steam"], release) + try: + steam.update_info(release) + except Exception as e: # a lot of stuff can go wrong with Steam's API, better catch everything + logger.error("Failed to update release info using Steam's API on %s", release) + logger.exception(e) logger.info("Final : %s %s : %s - %s : %s", release.platform, release.type, release.game_name, release.group, release) diff --git a/dailyreleases/stores/steam.py b/dailyreleases/stores/steam.py index 98f87b8..ba19bc1 100644 --- a/dailyreleases/stores/steam.py +++ b/dailyreleases/stores/steam.py @@ -85,8 +85,9 @@ def search(query: str) -> Optional[str]: return None -def update_info(link: str, release: Release) -> None: +def update_info(release: Release) -> None: logger.debug("Getting information about game using Steam API") + link = release.store_links["Steam"] link_type, appid = re.search("(app|sub|bundle)(?:/)([0-9]+)", link).groups() if link_type == "bundle":