Update NSLGameScanner.py

This commit is contained in:
Roy 2024-06-21 07:06:24 -07:00 committed by GitHub
parent d28a10ced5
commit fdfedc6dd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -597,13 +597,19 @@ if app_ids and os.path.exists(os.path.join(compatdata_dir, 'NonSteamLaunchers'))
# Print the existing shortcuts
print("Existing Shortcuts:")
for shortcut in shortcuts['shortcuts'].values():
if shortcut.get('appname') is None:
print(f"AppID for {shortcut.get('AppName')}: {shortcut.get('appid')}")
else:
print(f"AppID for {shortcut.get('appname')}: {shortcut.get('appid')}")
#Print if any shorcuts exist
if 'shortcuts' in shortcuts:
print("Existing Shortcuts:")
for shortcut in shortcuts['shortcuts'].values():
# Check if 'appname' or 'AppName' is not in shortcut
if shortcut.get('appname') is None and shortcut.get('AppName') is None:
continue # Skip this iteration if no shortcut key
elif shortcut.get('appname') is None:
print(f"AppID for {shortcut.get('AppName')}: {shortcut.get('appid')}")
else:
print(f"AppID for {shortcut.get('appname')}: {shortcut.get('appid')}")
else:
print("No shortcuts found.")