diff options
-rw-r--r-- | modules/home.legacy/conf/beets/default.nix | 16 | ||||
-rw-r--r-- | modules/home.legacy/conf/beets/plugins.nix | 2 | ||||
-rw-r--r-- | modules/home.legacy/conf/beets/plugins/default.nix | 1 | ||||
-rw-r--r-- | modules/home.legacy/conf/beets/plugins/inline/default.nix | 18 |
4 files changed, 34 insertions, 3 deletions
diff --git a/modules/home.legacy/conf/beets/default.nix b/modules/home.legacy/conf/beets/default.nix index 612a5f03..3eeeee25 100644 --- a/modules/home.legacy/conf/beets/default.nix +++ b/modules/home.legacy/conf/beets/default.nix @@ -67,9 +67,19 @@ in { paths = let join = lib.strings.concatStringsSep "/"; in { - "albumtype:live" = join ["[Live, please delete]" "$genre" "$first_artist" "$album ($albumtype)" "$track $title"]; - - default = "$albumartist/$album%aunique{}/$track $title"; + "albumtype:live" = join [ + "[Live, please delete]" + "$genre" + "$primary_artist" # (= $albumartists[0]). From inline plugin + "$album ($albumtype)" + "$track $title" + ]; + + default = join [ + "$primary_artist" # (= $albumartists[0]). From inline plugin + "$album%aunique{}" + "$track $title" + ]; }; inherit plugins; diff --git a/modules/home.legacy/conf/beets/plugins.nix b/modules/home.legacy/conf/beets/plugins.nix index a3abb580..ed78b49e 100644 --- a/modules/home.legacy/conf/beets/plugins.nix +++ b/modules/home.legacy/conf/beets/plugins.nix @@ -35,6 +35,8 @@ # `mpdupgate` can propagate changed playlist to `mpd`. "smartplaylist" + "inline" + # Warn, when importing a matching item "ihate" diff --git a/modules/home.legacy/conf/beets/plugins/default.nix b/modules/home.legacy/conf/beets/plugins/default.nix index ddba95e0..d22369be 100644 --- a/modules/home.legacy/conf/beets/plugins/default.nix +++ b/modules/home.legacy/conf/beets/plugins/default.nix @@ -12,6 +12,7 @@ ./badfiles ./duplicates ./ihate + ./inline ./lyrics ./replaygain ./smartplaylist diff --git a/modules/home.legacy/conf/beets/plugins/inline/default.nix b/modules/home.legacy/conf/beets/plugins/inline/default.nix new file mode 100644 index 00000000..564d5b4c --- /dev/null +++ b/modules/home.legacy/conf/beets/plugins/inline/default.nix @@ -0,0 +1,18 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{...}: { + programs.beets.settings.item_fields = { + primary_artist = + # python + '' + albumartists[0] + ''; + }; +} |