summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-22 23:20:00 -0500
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-22 23:20:00 -0500
commitbce981b1e7dad5da84197eb4357658eb5fdd5ad0 (patch)
treeb74306257d237734c8f3a120194cb9b95b319426 /main.py
parentaaaa3d6d8cf41b2de461cd4510d18e5cc8e60ec8 (diff)
downloadDecky-Framegen-bce981b1e7dad5da84197eb4357658eb5fdd5ad0.tar.gz
Decky-Framegen-bce981b1e7dad5da84197eb4357658eb5fdd5ad0.zip
cleaned up install output debugging, added instructions
Diffstat (limited to 'main.py')
-rw-r--r--main.py78
1 files changed, 39 insertions, 39 deletions
diff --git a/main.py b/main.py
index f26d320..e340429 100644
--- a/main.py
+++ b/main.py
@@ -6,48 +6,48 @@ from pathlib import Path
class Plugin:
async def _main(self):
- decky.logger.info("Framegen plugin loaded (old decorator-free approach).")
+ decky.logger.info("Framegen plugin loaded")
async def _unload(self):
decky.logger.info("Framegen plugin unloaded.")
- # Public method: front end can call this via callable("get_installed_games")
- async def get_installed_games(self) -> str:
- library_file = "/home/deck/.steam/steam/steamapps/libraryfolders.vdf"
- libraries = []
-
- # Find library folders
- if os.path.exists(library_file):
- with open(library_file, "r") as f:
- lines = f.readlines()
- for line in lines:
- if '"path"' in line:
- folder_path = line.split('"')[3]
- libraries.append(os.path.join(folder_path, "steamapps"))
-
- # Gather installed games
- games = []
- for library in libraries:
- if os.path.exists(library):
- manifest_files = [
- f for f in os.listdir(library)
- if f.startswith("appmanifest_")
- ]
- for manifest in manifest_files:
- manifest_path = os.path.join(library, manifest)
- with open(manifest_path, "r") as mf:
- lines = mf.readlines()
- appid = ""
- name = ""
- for line in lines:
- if '"appid"' in line:
- appid = line.split('"')[3]
- elif '"name"' in line:
- name = line.split('"')[3]
- if appid and name:
- games.append({"appid": appid, "name": name})
-
- return json.dumps(games)
+ # # Public method: front end can call this via callable("get_installed_games")
+ # async def get_installed_games(self) -> str:
+ # library_file = "/home/deck/.steam/steam/steamapps/libraryfolders.vdf"
+ # libraries = []
+
+ # # Find library folders
+ # if os.path.exists(library_file):
+ # with open(library_file, "r") as f:
+ # lines = f.readlines()
+ # for line in lines:
+ # if '"path"' in line:
+ # folder_path = line.split('"')[3]
+ # libraries.append(os.path.join(folder_path, "steamapps"))
+
+ # # Gather installed games
+ # games = []
+ # for library in libraries:
+ # if os.path.exists(library):
+ # manifest_files = [
+ # f for f in os.listdir(library)
+ # if f.startswith("appmanifest_")
+ # ]
+ # for manifest in manifest_files:
+ # manifest_path = os.path.join(library, manifest)
+ # with open(manifest_path, "r") as mf:
+ # lines = mf.readlines()
+ # appid = ""
+ # name = ""
+ # for line in lines:
+ # if '"appid"' in line:
+ # appid = line.split('"')[3]
+ # elif '"name"' in line:
+ # name = line.split('"')[3]
+ # if appid and name:
+ # games.append({"appid": appid, "name": name})
+
+ # return json.dumps(games)
# Public method: front end can call this via callable("run_install_fgmod")
async def run_install_fgmod(self) -> dict:
@@ -101,7 +101,7 @@ class Plugin:
return {
"status": "success",
- "output": process.stdout
+ "output": "in the games' launch options, add: /home/deck/fgmod/fgmod %COMMAND%"
}
except subprocess.TimeoutExpired: