l radio: post currently playing song to irc
This commit is contained in:
parent
1e29f55895
commit
e0576eb972
@ -196,6 +196,14 @@ in {
|
|||||||
done | while read track; do
|
done | while read track; do
|
||||||
echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE"
|
echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE"
|
||||||
echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$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
|
done
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
@ -207,6 +215,7 @@ in {
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = recentlyPlayed;
|
ExecStart = recentlyPlayed;
|
||||||
|
User = "radio";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -219,6 +228,7 @@ in {
|
|||||||
useTLS = true;
|
useTLS = true;
|
||||||
nick = "the_playlist";
|
nick = "the_playlist";
|
||||||
username = "radio";
|
username = "radio";
|
||||||
|
API.listen = "unix:/home/radio/reaktor.sock";
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
plugin = "register";
|
plugin = "register";
|
||||||
|
Loading…
Reference in New Issue
Block a user