added extra check for AppName and Exe in existing shortcut check

This commit is contained in:
sysmoon14 2024-02-27 16:19:44 +00:00 committed by GitHub
parent 1f41ecb9ae
commit d2f6991d44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -308,6 +308,9 @@ def check_if_shortcut_exists(shortcut_id, display_name, exe_path, start_dir, lau
if any(s.get('appname') == display_name and s.get('exe') == exe_path and s.get('StartDir') == start_dir and s.get('LaunchOptions') == launch_options for s in shortcuts['shortcuts'].values()):
print(f"Existing shortcut found based on matching fields for game {display_name}. Skipping creation.")
return True
if any(s.get('AppName') == display_name and s.get('Exe') == exe_path and s.get('StartDir') == start_dir and s.get('LaunchOptions') == launch_options for s in shortcuts['shortcuts'].values()):
print(f"Existing shortcut found based on matching fields for game {display_name}. Skipping creation.")
return True
#End of Code