diff options
author | boredpasta <boredpasta@tutanota.com> | 2023-07-17 16:43:23 +0300 |
---|---|---|
committer | boredpasta <boredpasta@tutanota.com> | 2023-07-17 16:43:23 +0300 |
commit | 93ddae21ac250ee648365771f33fa21bb24bd415 (patch) | |
tree | eb16140a6fb7527ebd88f7ca6f5d5f6dfa7395e0 | |
parent | 7ce365d6f94fe1b8e9889c956b74e1100581af29 (diff) |
mpc-notify: directly test command exit status
-rwxr-xr-x | mpc-notify | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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}" \ |