mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 07:11:52 +01:00
Update NSLGameScanner.py
This commit is contained in:
parent
f3b3936fa9
commit
f7246960fd
@ -613,25 +613,19 @@ for launcher_name, folder in folder_names.items():
|
||||
|
||||
# Check if the new path already exists
|
||||
if os.path.exists(new_path):
|
||||
# Check if the directory is empty
|
||||
if not os.listdir(new_path):
|
||||
print(f'{new_path} is empty. Deleting directory.')
|
||||
os.rmdir(new_path)
|
||||
else:
|
||||
print(f'{new_path} already exists and is not empty. Skipping renaming and symlinking.')
|
||||
continue # skip to the next iteration
|
||||
print(f'{new_path} already exists. Skipping renaming and symlinking.')
|
||||
else:
|
||||
# Rename the folder
|
||||
os.rename(current_path, new_path)
|
||||
print(f"Renamed {current_path} to {new_path}")
|
||||
|
||||
# Rename the folder
|
||||
os.rename(current_path, new_path)
|
||||
print(f"Renamed {current_path} to {new_path}")
|
||||
# Define the path of the symbolic link
|
||||
symlink_path = os.path.join(compatdata_dir, folder)
|
||||
print(f"Symlink path for {launcher_name}: {symlink_path}")
|
||||
|
||||
# Define the path of the symbolic link
|
||||
symlink_path = os.path.join(compatdata_dir, folder)
|
||||
print(f"Symlink path for {launcher_name}: {symlink_path}")
|
||||
|
||||
# Create a symbolic link to the renamed folder
|
||||
os.symlink(new_path, symlink_path)
|
||||
print(f"Created symlink at {symlink_path} to {new_path}")
|
||||
# Create a symbolic link to the renamed folder
|
||||
os.symlink(new_path, symlink_path)
|
||||
print(f"Created symlink at {symlink_path} to {new_path}")
|
||||
else:
|
||||
print(f'App ID for {launcher_name} is not available yet.')
|
||||
else:
|
||||
@ -639,6 +633,7 @@ for launcher_name, folder in folder_names.items():
|
||||
|
||||
|
||||
|
||||
|
||||
# Define the appid for the custom shortcut
|
||||
custom_app_id = 4206469918
|
||||
print(f"App ID for the custom shortcut: {custom_app_id}")
|
||||
|
Loading…
Reference in New Issue
Block a user