mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: script for handling lassulus radio
This commit is contained in:
@@ -83,6 +83,12 @@ in rec {
|
||||
script = ./dirmir.sh;
|
||||
};
|
||||
|
||||
playlist = wrapScript {
|
||||
name = "pls";
|
||||
script = ./playlist.sh;
|
||||
packages = [ pkgs.curl pkgs.jq ];
|
||||
};
|
||||
|
||||
favicon = wrapScript {
|
||||
packages = [ pkgs.imagemagick ];
|
||||
name = "favicon";
|
||||
|
||||
12
packages/scripts/playlist.sh
Executable file
12
packages/scripts/playlist.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
endpoint=prism.r:8001
|
||||
|
||||
case "$1" in
|
||||
good|like|cool|nice|yes|+)
|
||||
curl -sS -XPOST "$endpoint/good";;
|
||||
skip|next|bad|sucks|no|nope|-)
|
||||
curl -sS -XPOST "$endpoint/skip";;
|
||||
*)
|
||||
curl -sS -XGET "$endpoint/current" | jq;;
|
||||
esac
|
||||
Reference in New Issue
Block a user