This commit is contained in:
2025-12-08 23:38:11 -08:00
parent baed6a3196
commit ff8a2a982b
3 changed files with 95 additions and 6 deletions

10
projects/scripts/songinfo.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
music_dir="/jellyfin/music"
previewdir="$XDG_CONFIG_HOME/ncmpcpp/previews"
filename="$(mpc --format "$music_dir"/%file% current)"
previewname="$previewdir/$(mpc --format %album% current | base64).png"
[ -e "$previewname" ] || ffmpeg -y -i "$filename" -an -vf scale=128:128 "$previewname" > /dev/null 2>&1
notify-send -a "ncmpcpp" "Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)" -i "$previewname"