commit 93ddae21ac250ee648365771f33fa21bb24bd415 from: boredpasta date: Mon Jul 17 13:43:23 2023 UTC mpc-notify: directly test command exit status commit - 7ce365d6f94fe1b8e9889c956b74e1100581af29 commit + 93ddae21ac250ee648365771f33fa21bb24bd415 blob - 21d94c6a17b07c4d7f2031e24e1b79363e869e63 blob + abf9adfeaaaf016c01b930e9611ed03c9c5ab4b0 --- mpc-notify +++ mpc-notify @@ -127,9 +127,9 @@ if [ "$use_preview" -eq 1 ]; then song_icon="$preview_path" else song_dirname=$(dirname "$song_filename") - art_filename="$(find "$song_dirname" -type f | + if art_filename="$(find "$song_dirname" -type f | grep -Esm 1 '.*\.(jpg|png)')" - if [ $? -eq 0 ]; then + then # or use scaled cover art from directory ffmpeg -y -i "$art_filename" -an -vf \ scale="${preview_width}:${preview_height}" \