From 0e2903de327253221864d959d658abd70ab8cd4e Mon Sep 17 00:00:00 2001
From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
Date: Sun, 11 Aug 2024 02:35:00 +0200
Subject: feat(home/beets): Init 'play' plugin

---
 modules/home/conf/beets/default.nix | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'modules/home/conf')

diff --git a/modules/home/conf/beets/default.nix b/modules/home/conf/beets/default.nix
index 9b88db88..145ae337 100644
--- a/modules/home/conf/beets/default.nix
+++ b/modules/home/conf/beets/default.nix
@@ -89,6 +89,13 @@
           "title:commentary"
         ];
       };
+      play = {
+        command = "${lib.getExe pkgs.mpc-cli} $args add";
+        relative_to = config.services.mpd.musicDirectory;
+
+        # Run the command with the returned paths as arguments
+        raw = true;
+      };
       smartplaylist = {
         relative_to = config.services.mpd.musicDirectory;
         playlist_dir = config.services.mpd.playlistDirectory;
@@ -174,6 +181,9 @@
         # Alows to use inline python for parsing tags
         "inline"
 
+        # Support player integration
+        "play"
+
         # Show tags on files/queries
         "info"
 
-- 
cgit 1.4.1