mirror of
https://github.com/kmein/niveum
synced 2026-03-21 20:31:07 +01:00
feat(pls): add recent command
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
playlistAPI = "prism.r:8001";
|
playlistAPI = "https://radio.lassul.us";
|
||||||
|
|
||||||
sendIRC = pkgs.writers.writeDash "send-irc" ''
|
sendIRC = pkgs.writers.writeDash "send-irc" ''
|
||||||
${pkgs.ircaids}/bin/ircsink \
|
${pkgs.ircaids}/bin/ircsink \
|
||||||
@@ -51,6 +51,9 @@ pkgs.writers.writeDashBin "pls" ''
|
|||||||
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
|
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
|
||||||
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
|
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
|
||||||
;;
|
;;
|
||||||
|
recent)
|
||||||
|
${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/recent" | tac | head
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/current" \
|
${pkgs.curl}/bin/curl -sS -XGET "${playlistAPI}/current" \
|
||||||
| ${pkgs.miller}/bin/mlr --ijson --oxtab cat \
|
| ${pkgs.miller}/bin/mlr --ijson --oxtab cat \
|
||||||
|
|||||||
Reference in New Issue
Block a user