mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2026-06-13 04:04:59 +03:00
Remove scan state reset logic from NSLGameScanner
Removed code for resetting scan state from the gate file.
This commit is contained in:
@@ -3923,7 +3923,6 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir, lau
|
|||||||
print(f"[NSL] Scan state is OFF. Skipping shortcut creation for {appname}.")
|
print(f"[NSL] Scan state is OFF. Skipping shortcut creation for {appname}.")
|
||||||
return
|
return
|
||||||
|
|
||||||
# Continue shortcut creation here...
|
|
||||||
global new_shortcuts_added
|
global new_shortcuts_added
|
||||||
global shortcuts_updated
|
global shortcuts_updated
|
||||||
global created_shortcuts
|
global created_shortcuts
|
||||||
@@ -4080,41 +4079,6 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir, lau
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open(gate_file, "r", encoding="utf-8") as f:
|
|
||||||
lines = f.readlines()
|
|
||||||
|
|
||||||
new_lines = []
|
|
||||||
changed = False
|
|
||||||
|
|
||||||
for line in lines:
|
|
||||||
stripped = line.strip()
|
|
||||||
if stripped.startswith("NSL_SCAN_STATE="):
|
|
||||||
state = line.split("=", 1)[1].strip().upper()
|
|
||||||
|
|
||||||
if state == "MANUAL":
|
|
||||||
new_lines.append("NSL_SCAN_STATE=OFF\n")
|
|
||||||
scan_state = "OFF"
|
|
||||||
changed = True
|
|
||||||
print("[NSL] Scan state was MANUAL. Reset to OFF.")
|
|
||||||
else:
|
|
||||||
new_lines.append(line)
|
|
||||||
scan_state = state
|
|
||||||
else:
|
|
||||||
new_lines.append(line)
|
|
||||||
|
|
||||||
if changed:
|
|
||||||
with open(gate_file, "w", encoding="utf-8") as f:
|
|
||||||
f.writelines(new_lines)
|
|
||||||
|
|
||||||
except FileNotFoundError:
|
|
||||||
print(f"[NSL] Gate file not found during reset: {gate_file}")
|
|
||||||
except Exception as e:
|
|
||||||
print(f"[NSL] Error resetting scan state: {e}")
|
|
||||||
|
|
||||||
|
|
||||||
remove_lines = {
|
remove_lines = {
|
||||||
'chromelaunchoptions',
|
'chromelaunchoptions',
|
||||||
'websites_str',
|
'websites_str',
|
||||||
|
|||||||
Reference in New Issue
Block a user