Skip to content

Commit

Permalink
Fix for Epic Games to Avoid DLC
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy authored Aug 19, 2024
1 parent efd28ca commit a06cbf4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions NSLGameScanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir):
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:
Expand All @@ -770,14 +770,15 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir):
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



Expand Down

0 comments on commit a06cbf4

Please sign in to comment.