summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-04-18 19:17:27 +0200
committerlassulus <lassulus@lassul.us>2020-04-18 19:17:27 +0200
commite0576eb972a8ad60bd8f9a4418add448d1e674a5 (patch)
treece8a6162f121c41cf1055b80f815eb48048ef99d
parent1e29f558953e47bd77e1514dd993304ecb9f453e (diff)
l radio: post currently playing song to irc
-rw-r--r--lass/2configs/radio.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index 9da0a499c..562dbbe58 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -196,6 +196,14 @@ in {
done | while read track; do
echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE"
echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE"
+ ${pkgs.curl}/bin/curl -fsSv --unix-socket /home/radio/reaktor.sock http://z/ \
+ -H content-type:application/json \
+ -d "$(${pkgs.jq}/bin/jq -n \
+ --arg track "$track" '{
+ command:"PRIVMSG",
+ params:["#the_playlist","playing: " + $track]
+ }'
+ )"
done
'';
in {
@@ -207,6 +215,7 @@ in {
serviceConfig = {
ExecStart = recentlyPlayed;
+ User = "radio";
};
};
@@ -219,6 +228,7 @@ in {
useTLS = true;
nick = "the_playlist";
username = "radio";
+ API.listen = "unix:/home/radio/reaktor.sock";
plugins = [
{
plugin = "register";