Update NSLGameScanner.py

This commit is contained in:
Roy 2024-06-22 02:24:08 -07:00 committed by GitHub
parent 548c4e41ff
commit 582ce6e1d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -554,6 +554,8 @@ for launcher_name, folder in folder_names.items():
# Get the app ID for this launcher from the app_id_to_name dictionary # Get the app ID for this launcher from the app_id_to_name dictionary
appid = app_ids.get(launcher_name) appid = app_ids.get(launcher_name)
# If appid is not None, proceed with renaming and symlink creation
if appid is not None:
# Define the new path of the folder # Define the new path of the folder
new_path = os.path.join(compatdata_dir, str(appid)) new_path = os.path.join(compatdata_dir, str(appid))
@ -569,6 +571,8 @@ for launcher_name, folder in folder_names.items():
# Create a symbolic link to the renamed folder # Create a symbolic link to the renamed folder
os.symlink(new_path, symlink_path) os.symlink(new_path, symlink_path)
else:
print(f'App ID for {launcher_name} is not available yet.')
else: else:
print(f'{launcher_name}: {folder} does not exist') print(f'{launcher_name}: {folder} does not exist')