diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-10 14:47:00 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-10 14:47:00 +0200 |
commit | 94370b149fa505c9aeb2c37996419fd7f91588d1 (patch) | |
tree | e8067c643797c2db346e38fd4653f91a3698420b /pkgs/by-name/mp/mpc-searchadd | |
parent | fix(pkgs/lyrics): Make the music dir configurable (diff) | |
download | nixos-config-94370b149fa505c9aeb2c37996419fd7f91588d1.zip |
fix(pkgs/mpc): Update the new music handling system
Diffstat (limited to '')
-rwxr-xr-x | pkgs/by-name/mp/mpc-searchadd/mpc-searchadd.sh | 14 | ||||
-rw-r--r-- | pkgs/by-name/mp/mpc-searchadd/package.nix (renamed from pkgs/by-name/mp/mpc-fav/package.nix) | 7 |
2 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/by-name/mp/mpc-searchadd/mpc-searchadd.sh b/pkgs/by-name/mp/mpc-searchadd/mpc-searchadd.sh new file mode 100755 index 00000000..3fe9a6b6 --- /dev/null +++ b/pkgs/by-name/mp/mpc-searchadd/mpc-searchadd.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH + +tracks="$(mktmp)" +beet list "$@" --path >"$tracks" + +while read -r track; do + mpc add "$track" +done <"$tracks" + +mpc playlist +# vim: ft=sh diff --git a/pkgs/by-name/mp/mpc-fav/package.nix b/pkgs/by-name/mp/mpc-searchadd/package.nix index 2d3a8f3f..54ceca91 100644 --- a/pkgs/by-name/mp/mpc-fav/package.nix +++ b/pkgs/by-name/mp/mpc-searchadd/package.nix @@ -1,13 +1,16 @@ { sysLib, mpc-cli, + beets, }: sysLib.writeShellScript { - name = "mpc-fav"; - src = ./mpc-fav.sh; + name = "mpc-searchadd"; + src = ./mpc-searchadd.sh; generateCompletions = false; keepPath = false; + dependencies = [ mpc-cli + beets ]; } |