From 3b76cc8a48c5a3139d2136f94aa96ae8162fdcf8 Mon Sep 17 00:00:00 2001 From: sysmoon14 <61550824+sysmoon14@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:23:36 +0000 Subject: [PATCH] Added removal of chrome env vars so that sites are only added once --- NSLGameScanner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NSLGameScanner.py b/NSLGameScanner.py index 770e9c7..120eb3d 100644 --- a/NSLGameScanner.py +++ b/NSLGameScanner.py @@ -31,6 +31,12 @@ for line in lines: name, value = line.strip().split('=', 1) os.environ[name] = value +# Delete env_vars entries for Chrome shortcuts so that they're only added once +with open(env_vars_path, 'w') as f: + for line in lines: + if line.find('chromelaunchoptions') == -1 and line.find('websites_str') == -1: + f.write(line) + # Variables from NonSteamLaunchers.sh steamid3 = os.environ['steamid3'] logged_in_home = os.environ['logged_in_home']