summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-27 10:52:40 -0500
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-27 10:52:40 -0500
commite48a7efe555140ee2f1f70e578b780f6e022d94f (patch)
tree79136d8347d2d71cadd77d543b5af58f355b99a9
parent76dc556974d56be76a08db053b098156889ab406 (diff)
downloadDecky-Framegen-e48a7efe555140ee2f1f70e578b780f6e022d94f.tar.gz
Decky-Framegen-e48a7efe555140ee2f1f70e578b780f6e022d94f.zip
feat: filter out proton items in app list
-rw-r--r--main.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.py b/main.py
index 224a723..06fe13d 100644
--- a/main.py
+++ b/main.py
@@ -125,7 +125,6 @@ class Plugin:
if not library_file.exists():
return {"status": "error", "message": "libraryfolders.vdf not found"}
- # Parse libraryfolders.vdf to get library paths
library_paths = []
with open(library_file, "r", encoding="utf-8") as file:
for line in file:
@@ -133,7 +132,6 @@ class Plugin:
path = line.split('"path"')[1].strip().strip('"').replace("\\\\", "/")
library_paths.append(path)
- # Extract game info from appmanifest files
games = []
for library_path in library_paths:
steamapps_path = Path(library_path) / "steamapps"
@@ -148,10 +146,14 @@ class Plugin:
game_info["appid"] = line.split('"appid"')[1].strip().strip('"')
if '"name"' in line:
game_info["name"] = line.split('"name"')[1].strip().strip('"')
+
if game_info["appid"] and game_info["name"]:
games.append(game_info)
- return {"status": "success", "games": games}
+ # Filter out games whose name contains "Proton"
+ filtered_games = [g for g in games if "Proton" not in g["name"]]
+
+ return {"status": "success", "games": filtered_games}
except Exception as e:
return {"status": "error", "message": str(e)} \ No newline at end of file