mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(pls): add recent command
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
|
||||
playlistAPI = "prism.r:8001";
|
||||
playlistAPI = "https://radio.lassul.us";
|
||||
|
||||
sendIRC = pkgs.writers.writeDash "send-irc" ''
|
||||
${pkgs.ircaids}/bin/ircsink \
|
||||
@@ -51,6 +51,9 @@ pkgs.writers.writeDashBin "pls" ''
|
||||
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
|
||||
${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.miller}/bin/mlr --ijson --oxtab cat \
|
||||
|
||||
Reference in New Issue
Block a user