mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 16:19:19 +01:00
Update NSLGameScanner.py
This commit is contained in:
parent
f62bc75eda
commit
b604b45b11
@ -1018,6 +1018,11 @@ if new_shortcuts_added or shortcuts_updated:
|
|||||||
# Assuming 'games' is a list of game dictionaries
|
# Assuming 'games' is a list of game dictionaries
|
||||||
games = [shortcut for shortcut in shortcuts['shortcuts'].values()]
|
games = [shortcut for shortcut in shortcuts['shortcuts'].values()]
|
||||||
|
|
||||||
|
# Create the path to the output file
|
||||||
|
output_file_path = f"{logged_in_home}/.config/systemd/user/NSLGameScanner_output.log"
|
||||||
|
|
||||||
|
# Open the output file in append mode
|
||||||
|
with open(output_file_path, 'a') as output_file:
|
||||||
for game in games:
|
for game in games:
|
||||||
# Skip if 'appname' or 'exe' is None
|
# Skip if 'appname' or 'exe' is None
|
||||||
if game.get('appname') is None or game.get('exe') is None:
|
if game.get('appname') is None or game.get('exe') is None:
|
||||||
@ -1038,12 +1043,7 @@ if new_shortcuts_added or shortcuts_updated:
|
|||||||
message = json.dumps(shortcut_info)
|
message = json.dumps(shortcut_info)
|
||||||
print(message, flush=True) # Print to stdout
|
print(message, flush=True) # Print to stdout
|
||||||
|
|
||||||
print("All finished!")
|
|
||||||
|
|
||||||
# Create the path to the output file
|
|
||||||
output_file_path = f"{logged_in_home}/.config/systemd/user/NSLGameScanner_output.log"
|
|
||||||
|
|
||||||
# Open the output file in append mode
|
|
||||||
with open(output_file_path, 'a') as output_file:
|
|
||||||
# Print the shortcut information to the output file
|
# Print the shortcut information to the output file
|
||||||
print(message, file=output_file, flush=True)
|
print(message, file=output_file, flush=True)
|
||||||
|
|
||||||
|
print("All finished!")
|
||||||
|
Loading…
Reference in New Issue
Block a user