dbq: parenthesize the patterns when running find

This commit is contained in:
John McQuah 2023-01-14 20:56:31 -05:00
parent 6ba1169daf
commit 5911630a9f
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ fullpath="$2/$target"
if [ -r "$target" ]; then
[ -n "$(ps --no-header -C deadbeef-main)" ] || exit 0
[ -f "$target" ] && deadbeef --queue -- "$fullpath" 2>/dev/null
[ -d "$target" ] && find "$fullpath" -iname "*.mp3" \
[ -d "$target" ] && find "$fullpath" \( -iname "*.mp3" \
-o -iname "*.ogg" -o -iname "*.flac" \
-o -iname "*.m4a" -print0 | sort -z \
-o -iname "*.m4a" \) -print0 | sort -z \
| xargs -0 deadbeef --queue -- 2>/dev/null
fi