From b68be3a607138e08f4d01ac69abb36cffc0c5713 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Thu, 22 Aug 2024 03:00:24 -0700 Subject: [PATCH] oops --- NSLGameScanner.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/NSLGameScanner.py b/NSLGameScanner.py index aafeb33..84db727 100644 --- a/NSLGameScanner.py +++ b/NSLGameScanner.py @@ -1190,25 +1190,25 @@ def get_itch_games(itch_db_location): return games def parse_butler_db(content): - decky_plugin.logger.info("Finding matches in the database content...") + print("Finding matches in the database content...") pattern = rb'\{"basePath":"(.*?)","totalSize".*?"candidates":\[(.*?)\]\}' matches = re.findall(pattern, content) - decky_plugin.logger.info(f"Found {len(matches)} matches.") + print(f"Found {len(matches)} matches.") - decky_plugin.logger.info("Converting matches to database paths...") + print("Converting matches to database paths...") db_paths = [] for match in matches: base_path = match[0].decode(errors='ignore') candidates_json = b'[' + match[1] + b']' - decky_plugin.logger.info(f"Candidates JSON: {candidates_json}") + print(f"Candidates JSON: {candidates_json}") try: candidates = json.loads(candidates_json.decode(errors='ignore')) paths = [candidate['path'] for candidate in candidates] db_paths.append((base_path, paths)) except json.JSONDecodeError as e: - decky_plugin.logger.error(f"JSON decoding error: {e}. Skipping this entry and continuing...") + print(f"JSON decoding error: {e}. Skipping this entry and continuing...") continue - decky_plugin.logger.info(f"Converted {len(matches)} matches to {len(db_paths)} database paths.") + print(f"Converted {len(matches)} matches to {len(db_paths)} database paths.") return db_paths def dbpath_to_game(paths): @@ -1244,6 +1244,7 @@ for game in games: #End of Itchio Scanner + #Legacy Games Scanner legacy_dir = f"{logged_in_home}/.local/share/Steam/steamapps/compatdata/{legacy_launcher}/pfx/drive_c/Program Files/Legacy Games/"