mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 08:09:18 +01:00
Update NSLGameScanner.py
This commit is contained in:
parent
8829a4d382
commit
0ab84b8a08
@ -723,7 +723,7 @@ else:
|
||||
|
||||
|
||||
|
||||
#Gog Galaxy Scanner
|
||||
# Gog Galaxy Scanner
|
||||
def getGogGameInfo(filePath):
|
||||
# Check if the file contains any GOG entries
|
||||
with open(filePath, 'r') as file:
|
||||
@ -739,6 +739,7 @@ def getGogGameInfo(filePath):
|
||||
exe_path = None
|
||||
depends_on = None
|
||||
launch_command = None
|
||||
start_menu_link = None
|
||||
for line in file:
|
||||
split_line = line.split("=")
|
||||
if len(split_line) > 1:
|
||||
@ -763,18 +764,21 @@ def getGogGameInfo(filePath):
|
||||
launch_command = re.findall(r'\"(.+?)\"', split_line[1])
|
||||
if launch_command:
|
||||
launch_command = launch_command[0]
|
||||
if game_id and game_name and launch_command:
|
||||
if "startMenuLink" in line:
|
||||
start_menu_link = re.findall(r'\"(.+?)\"', split_line[1])
|
||||
if start_menu_link:
|
||||
start_menu_link = start_menu_link[0]
|
||||
if game_id and game_name and launch_command and 'GOG.com' in start_menu_link:
|
||||
game_dict[game_name] = {'id': game_id, 'exe': exe_path}
|
||||
game_id = None
|
||||
game_name = None
|
||||
exe_path = None
|
||||
depends_on = None
|
||||
launch_command = None
|
||||
start_menu_link = None
|
||||
|
||||
return game_dict
|
||||
|
||||
|
||||
|
||||
# Define your paths
|
||||
gog_games_directory = f"{logged_in_home}/.local/share/Steam/steamapps/compatdata/{gog_galaxy_launcher}/pfx/drive_c/Program Files (x86)/GOG Galaxy/Games"
|
||||
registry_file_path = f"{logged_in_home}/.local/share/Steam/steamapps/compatdata/{gog_galaxy_launcher}/pfx/system.reg"
|
||||
@ -797,6 +801,7 @@ else:
|
||||
|
||||
|
||||
|
||||
|
||||
#Battle.net Scanner
|
||||
# Define your mapping
|
||||
flavor_mapping = {
|
||||
|
Loading…
Reference in New Issue
Block a user