Fix for Epic Games to Avoid DLC

This commit is contained in:
Roy 2024-08-18 18:20:59 -07:00 committed by GitHub
parent efd28ca143
commit a06cbf4e35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -757,7 +757,7 @@ if os.path.exists(dat_file_path) and os.path.exists(item_dir):
with open(dat_file_path, 'r') as file:
dat_data = json.load(file)
#Epic Game Scanner
# Epic Game Scanner
for item_file in os.listdir(item_dir):
if item_file.endswith('.item'):
with open(os.path.join(item_dir, item_file), 'r') as file:
@ -770,14 +770,15 @@ if os.path.exists(dat_file_path) and os.path.exists(item_dir):
start_dir = f"\"{logged_in_home}/.local/share/Steam/steamapps/compatdata/{epic_games_launcher}/pfx/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/\""
launch_options = f"STEAM_COMPAT_DATA_PATH=\"{logged_in_home}/.local/share/Steam/steamapps/compatdata/{epic_games_launcher}\" %command% -'com.epicgames.launcher://apps/{app_name}?action=launch&silent=true'"
# Check if the game is still installed
for game in dat_data['InstallationList']:
if game['AppName'] == item_data['AppName']:
create_new_entry(exe_path, display_name, launch_options, start_dir)
# Check if the game is still installed and if the LaunchExecutable is valid, not content-related, and is a .exe file
if item_data['LaunchExecutable'].endswith('.exe') and "Content" not in item_data['DisplayName'] and "Content" not in item_data['InstallLocation']:
for game in dat_data['InstallationList']:
if game['AppName'] == item_data['AppName']:
create_new_entry(exe_path, display_name, launch_options, start_dir)
else:
print("Epic Games Launcher data not found. Skipping Epic Games Scanner.")
#End of the Epic Games Scanner
# End of the Epic Games Scanner