mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 15:21:52 +01:00
Reverted
This commit is contained in:
parent
cdff413f4c
commit
e5153c06e0
@ -1018,8 +1018,6 @@ 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()]
|
||||||
|
|
||||||
# Open the output file in write mode ('w')
|
|
||||||
with open('output.json', 'w') as outfile:
|
|
||||||
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:
|
||||||
@ -1036,13 +1034,10 @@ if new_shortcuts_added or shortcuts_updated:
|
|||||||
'GameID': game.get('GameID', "default_game_id") # Use a default value if game_id is not defined
|
'GameID': game.get('GameID', "default_game_id") # Use a default value if game_id is not defined
|
||||||
}
|
}
|
||||||
|
|
||||||
# Convert the shortcut information to JSON format
|
# Print the shortcut information in JSON format
|
||||||
message = json.dumps(shortcut_info)
|
message = json.dumps(shortcut_info)
|
||||||
|
print(message, flush=True) # Print to stdout
|
||||||
# Write the JSON output to the file
|
|
||||||
outfile.write(message + '\n') # Add a newline character after each game
|
|
||||||
|
|
||||||
print("All finished!")
|
print("All finished!")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user