gsr-game-tracker: filter out DDNet (better steam filter)

This commit is contained in:
dec05eba
2026-04-28 10:09:44 +02:00
parent fce4844345
commit 3c35908f56
2 changed files with 10 additions and 4 deletions

View File

@@ -9,10 +9,14 @@ def extract_non_tracked_games(filepath):
game_names = [] game_names = []
with open(filepath, "r") as file: with open(filepath, "r") as file:
is_steam_game = False is_steam_game = False
for line in file.readlines(): for line in file:
if line.startswith("#"): if line.startswith("#"):
is_steam_game = "steam" in line if "steam" in line:
elif line.startswith("{") and not is_steam_game: is_steam_game = True
elif line.startswith("{"):
if is_steam_game:
continue
app_info = json.loads(line) app_info = json.loads(line)
if app_info["type"] != "Game": if app_info["type"] != "Game":
continue continue
@@ -20,6 +24,8 @@ def extract_non_tracked_games(filepath):
game_name = app_info["name"] game_name = app_info["name"]
if not game_name.endswith(".x86_64") and not game_name.endswith(".x86") and not game_name.endswith(".x64"): if not game_name.endswith(".x86_64") and not game_name.endswith(".x86") and not game_name.endswith(".x64"):
game_names.append(json.loads(line)["name"]) game_names.append(json.loads(line)["name"])
else:
is_steam_game = False
return game_names return game_names
def write_process_name_matcher_code_file(filepath, all_games): def write_process_name_matcher_code_file(filepath, all_games):

View File

@@ -5,7 +5,7 @@
/* This file was auto-generated with create-native-games-list.py, do not edit manually! */ /* This file was auto-generated with create-native-games-list.py, do not edit manually! */
static const char *process_names_len_12[] = { "soh.appimage", "supertuxkart", "HytaleClient", "Vintagestory", "ut-bin-amd64", "fs-uae-devel", "xenia_canary", "shadPS4:Main", NULL }; static const char *process_names_len_12[] = { "soh.appimage", "supertuxkart", "HytaleClient", "Vintagestory", "ut-bin-amd64", "fs-uae-devel", "xenia_canary", "shadPS4:Main", NULL };
static const char *process_names_len_5[] = { "sober", "DDNet", "zdoom", "cen64", "mesen", "higan", "rpcs3", NULL }; static const char *process_names_len_5[] = { "sober", "zdoom", "cen64", "mesen", "higan", "rpcs3", NULL };
static const char *process_names_len_14[] = { "sober_services", "chocolate-doom", "CodenameEngine", "quakespasm-svn", "2ship.appimage", "rott-shareware", "unreal-bin-x86", "PPSSPPHeadless", NULL }; static const char *process_names_len_14[] = { "sober_services", "chocolate-doom", "CodenameEngine", "quakespasm-svn", "2ship.appimage", "rott-shareware", "unreal-bin-x86", "PPSSPPHeadless", NULL };
static const char *process_names_len_15[] = { "UnleashedRecomp", "CoherentUI_Host", "linux_64_client", "rott-registered", "UnrealLinux.bin", "Quake3-UrT.i386", "DuckStation-x64", NULL }; static const char *process_names_len_15[] = { "UnleashedRecomp", "CoherentUI_Host", "linux_64_client", "rott-registered", "UnrealLinux.bin", "Quake3-UrT.i386", "DuckStation-x64", NULL };
static const char *process_names_len_10[] = { "sm64coopdx", "luanti.bin", "quakespasm", "srcds_i486", "rbdoom3bfg", "tyr-glqwcl", "ut-bin-x86", NULL }; static const char *process_names_len_10[] = { "sm64coopdx", "luanti.bin", "quakespasm", "srcds_i486", "rbdoom3bfg", "tyr-glqwcl", "ut-bin-x86", NULL };