about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-19 18:31:49 +0100
committerSoispha <soispha@vhack.eu>2023-12-19 18:31:49 +0100
commitd3638ae8fbe02af8f2a1d1e00eaa766dea976f75 (patch)
treea65670d2d255e9a3f40c291f5bbd1ffcf6221f89
parentfix(hm/pkgs/src/spodi): Set constant bitrate (diff)
downloadnixos-config-d3638ae8fbe02af8f2a1d1e00eaa766dea976f75.tar.gz
nixos-config-d3638ae8fbe02af8f2a1d1e00eaa766dea976f75.zip
fix(hm/pkgs/src/lyrics): Adapt to new spotdl settings
-rw-r--r--hm/soispha/pkgs/scripts.nix3
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/lyrics7
2 files changed, 2 insertions, 8 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index 663cb67c..d440e24a 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -143,10 +143,9 @@
     dependencies = builtins.attrValues {
       inherit
         (pkgs)
-        mediainfo
+        exiftool
         mpc-cli
         jq
-        gnused
         less
         locale # dependency of less
         ;
diff --git a/hm/soispha/pkgs/scripts/wrappers/lyrics b/hm/soispha/pkgs/scripts/wrappers/lyrics
index a72eede1..9e019fe2 100755
--- a/hm/soispha/pkgs/scripts/wrappers/lyrics
+++ b/hm/soispha/pkgs/scripts/wrappers/lyrics
@@ -3,14 +3,9 @@
 # shellcheck source=/dev/null
 SHELL_LIBRARY_VERSION="1.9.0" . %SHELL_LIBRARY_PATH
 
-
-out="$(mktmp)"
-
-print " " > "$out"
 (
     cd "$XDG_MUSIC_DIR" || die "No music dir!"
-    mediainfo --Output=JSON "$(mpc --format '%file%' current)" | jq -r '.media.track[0].Lyrics' | sed 's|/|\n|g' >> "$out"
+    exiftool "$(mpc --format '%file%' current)" -json | jq '.[0].Lyrics' -r | less
 )
-less "$out"
 
 # vim: ft=sh