Compare commits
5 Commits
handle-emp
...
master
Author | SHA1 | Date | |
---|---|---|---|
fde738910d | |||
546d921ec4 | |||
cb292a56b1 | |||
4617f83f5c | |||
047d09ffb1 |
@ -13,7 +13,7 @@ A set of simple API endpoints and ready-to-go clients to interface with the [Grz
|
||||
|
||||
## How to run this
|
||||
|
||||
pip install --user git+https://github.com/Programvareverkstedet/grzegorz_clients.git#master
|
||||
pip install --user git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git#master
|
||||
|
||||
### cli
|
||||
|
||||
@ -23,7 +23,7 @@ A set of simple API endpoints and ready-to-go clients to interface with the [Grz
|
||||
|
||||
As the user intended to run the server:
|
||||
|
||||
pip install --user git+https://github.com/Programvareverkstedet/grzegorz_clients.git#master
|
||||
pip install --user git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git#master
|
||||
grzegorz-webui --host-name 0.0.0.0 --port 80
|
||||
|
||||
It's rather insecure and could use a reverse proxy and some whitelisting. ;)
|
||||
|
6
flake.lock
generated
6
flake.lock
generated
@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1711703276,
|
||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
||||
"lastModified": 1726755586,
|
||||
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
||||
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -170,10 +170,11 @@ def set_volume(
|
||||
if volume.startswith("+") or volume.startswith("-"):
|
||||
current_volume = api.get_volume()
|
||||
new_volume = max(0, min(100, current_volume + int(volume)))
|
||||
new_volume = int(new_volume)
|
||||
else:
|
||||
new_volume = int(volume)
|
||||
|
||||
rich.print(api.set_volume(volume), file=sys.stderr)
|
||||
rich.print(api.set_volume(new_volume), file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user