about summary refs log tree commit diff stats
path: root/pkgs/by-name/mp/mpc-rm
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-10 14:47:00 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-10 14:47:00 +0200
commit94370b149fa505c9aeb2c37996419fd7f91588d1 (patch)
treee8067c643797c2db346e38fd4653f91a3698420b /pkgs/by-name/mp/mpc-rm
parentfix(pkgs/lyrics): Make the music dir configurable (diff)
downloadnixos-config-94370b149fa505c9aeb2c37996419fd7f91588d1.tar.gz
nixos-config-94370b149fa505c9aeb2c37996419fd7f91588d1.zip
fix(pkgs/mpc): Update the new music handling system
Diffstat (limited to 'pkgs/by-name/mp/mpc-rm')
-rwxr-xr-xpkgs/by-name/mp/mpc-rm/mpc-rm.sh5
-rw-r--r--pkgs/by-name/mp/mpc-rm/package.nix5
2 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/by-name/mp/mpc-rm/mpc-rm.sh b/pkgs/by-name/mp/mpc-rm/mpc-rm.sh
index 94e0634b..3209503c 100755
--- a/pkgs/by-name/mp/mpc-rm/mpc-rm.sh
+++ b/pkgs/by-name/mp/mpc-rm/mpc-rm.sh
@@ -3,8 +3,9 @@
 # shellcheck source=/dev/null
 SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
 
-cd "$XDG_MUSIC_DIR" || die "No music dir!"
-trash-put "$(mpc --format '%file%' current)"
+beet remove --delete \
+    title:"$(mpc --format '%title%' current)" \
+    album:"$(mpc --format '%album%' current)"
 mpc del 0
 
 # vim: ft=sh
diff --git a/pkgs/by-name/mp/mpc-rm/package.nix b/pkgs/by-name/mp/mpc-rm/package.nix
index 6b7e2ead..8af84279 100644
--- a/pkgs/by-name/mp/mpc-rm/package.nix
+++ b/pkgs/by-name/mp/mpc-rm/package.nix
@@ -1,15 +1,16 @@
 {
   sysLib,
   mpc-cli,
-  trash-cli,
+  beets,
 }:
 sysLib.writeShellScript {
   name = "mpc-rm";
   src = ./mpc-rm.sh;
   generateCompletions = false;
   keepPath = false;
+
   dependencies = [
     mpc-cli
-    trash-cli
+    beets
   ];
 }