summaryrefslogtreecommitdiff
path: root/decky_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'decky_client.py')
-rw-r--r--decky_client.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/decky_client.py b/decky_client.py
index 5fda567..38726ce 100644
--- a/decky_client.py
+++ b/decky_client.py
@@ -17,6 +17,13 @@ EVENT = 3
# Default store URL
DEFAULT_STORE_URL = "https://plugins.deckbrew.xyz/plugins"
+# Store type mapping
+STORE_TYPE_NAMES = {
+ 0: "default",
+ 1: "testing",
+ 2: "custom"
+}
+
def log(*args: Any) -> None:
"""Print formatted logs to stderr."""
@@ -351,7 +358,7 @@ async def get_store_url() -> str:
if msg.get("type") == REPLY:
store_type = msg.get('result')
- store_type_name = {0: "default", 1: "testing", 2: "custom"}.get(store_type, f"unknown ({store_type})")
+ store_type_name = STORE_TYPE_NAMES.get(store_type, f"unknown ({store_type})")
log(f"Current store type: {store_type_name}")
elif msg.get("type") == ERROR:
log(f"Server error: {msg.get('error')}")