From fd6ee45d6254e4ae0fbe4c6ecca0d51417d1f7fa Mon Sep 17 00:00:00 2001 From: Patrick762 Date: Sat, 21 Dec 2024 22:22:48 +0100 Subject: [PATCH] changed db path, updated readme --- .gitignore | 3 +-- README.md | 2 +- streamdeckapi/const.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2c35a6d..927d8cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ **/__pycache__/ build *.egg-info -*.db -*.db-journal +data *.png diff --git a/README.md b/README.md index 4f18af8..663e5d0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The docker image allows you to use the streamdeckapi server inside a docker cont ### Usage ```shell -docker run -v /dev/hidraw7:/dev/hidraw7 -p 6153:6153 --privileged ghcr.io/patrick762/streamdeckapi:main +docker run -v /dev/hidraw7:/dev/hidraw7 -v ./data/streamdeckapi:/streamdeckapi/data -p 6153:6153 --privileged ghcr.io/patrick762/streamdeckapi:main ``` **Note:** You have to change `hidraw7` to the path of your Stream Deck. You can find this path by using `lshid` (https://pypi.org/project/lshid/). diff --git a/streamdeckapi/const.py b/streamdeckapi/const.py index aef49fb..5b761e9 100644 --- a/streamdeckapi/const.py +++ b/streamdeckapi/const.py @@ -4,7 +4,7 @@ PLUGIN_PORT = 6153 PLUGIN_INFO = "/sd/info" PLUGIN_ICON = "/sd/icon" -DB_FILE = "streamdeckapi.db" +DB_FILE = "data/streamdeckapi.db" SD_SSDP = "urn:home-assistant-device:stream-deck" SD_ZEROCONF = "_stream-deck-api._tcp.local." DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S.%f"