mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2025-02-13 00:38:52 +01:00
Update NSLGameScanner.py
This commit is contained in:
parent
148e0cb9bb
commit
2f200aefb6
@ -1329,20 +1329,25 @@ else:
|
|||||||
# List to store final Itch.io game details
|
# List to store final Itch.io game details
|
||||||
itchgames = []
|
itchgames = []
|
||||||
|
|
||||||
# Match game_id between 'caves' and 'games' tables and collect relevant game details
|
# Match game_id between 'caves' and 'games' tables
|
||||||
|
itchgames = []
|
||||||
for cave in caves:
|
for cave in caves:
|
||||||
game_id = cave[1]
|
game_id = cave[1]
|
||||||
if game_id in games_dict:
|
if game_id in games_dict:
|
||||||
game_info = games_dict[game_id]
|
game_info = games_dict[game_id]
|
||||||
cave_info = json.loads(cave[11])
|
base_path = json.loads(cave[11])['basePath']
|
||||||
base_path = cave_info['basePath']
|
candidates = json.loads(cave[11])['candidates']
|
||||||
candidates = cave_info['candidates']
|
|
||||||
executable_path = candidates[0]['path']
|
|
||||||
|
|
||||||
# Skip games with an executable that ends with '.html' (browser games)
|
if candidates and isinstance(candidates, list) and len(candidates) > 0:
|
||||||
if executable_path.endswith('.html'):
|
executable_path = candidates[0].get('path')
|
||||||
|
if executable_path and executable_path.endswith('.html'):
|
||||||
print(f"Skipping browser game: {game_info[2]}")
|
print(f"Skipping browser game: {game_info[2]}")
|
||||||
continue
|
continue
|
||||||
|
game_title = game_info[2]
|
||||||
|
itchgames.append((base_path, executable_path, game_title))
|
||||||
|
else:
|
||||||
|
print(f"No candidates found for game: {game_info[2]}")
|
||||||
|
|
||||||
|
|
||||||
# Extract the game title
|
# Extract the game title
|
||||||
game_title = game_info[2]
|
game_title = game_info[2]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user