diff options
-rw-r--r-- | modules/by-name/lf/lf/ctpv/prev/audio/audio.sh | 2 | ||||
-rw-r--r-- | modules/common/default.nix | 3 | ||||
-rw-r--r-- | modules/home.legacy/conf/beets/default.nix | 18 | ||||
-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 |
6 files changed, 38 insertions, 6 deletions
diff --git a/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh b/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh index 324a2170..22894ca2 100644 --- a/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh +++ b/modules/by-name/lf/lf/ctpv/prev/audio/audio.sh @@ -19,7 +19,7 @@ audio() { ffmpegthumbnailer -i "$f" -s 0 -q 5 -t 10 -o "$cache_f" 2>/dev/null } -x="$(ffmpeg -hide_banner -i "$f" 2>&1)" +x="$(ffprobe -hide_banner "$f" 2>&1)" printf '%s\n' "$x" y=$((y + $(printf '%s\n' "$x" | wc -l))) diff --git a/modules/common/default.nix b/modules/common/default.nix index a272bd52..ab5d055f 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -159,7 +159,8 @@ "~/.local/share/unison" # These are just to big to be synchronized (# TODO: Work around that <2024-08-31> ) - "~/media/music" + "~/media/music/beets.old" + "~/media/music/deerix" "~/.local/share/Steam" ] ++ homeManagerSymlinks; diff --git a/modules/home.legacy/conf/beets/default.nix b/modules/home.legacy/conf/beets/default.nix index 612a5f03..2fec6881 100644 --- a/modules/home.legacy/conf/beets/default.nix +++ b/modules/home.legacy/conf/beets/default.nix @@ -42,7 +42,7 @@ in { }; replace = { - "[/]" = "\\"; + "[/]" = "\\\\"; "[\\x00-\\x1f]" = ""; "\\s+$" = ""; "^\\s+" = ""; @@ -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] + ''; + }; +} |