cruxports/deadbeef/dbq

20 lines
527 B
Plaintext
Raw Normal View History

2022-02-26 14:04:55 -05:00
#!/bin/sh
# Description: Add files or directories to the deadbeef queue
#
# Dependencies: deadbeef audio player
#
# Shell: sh
# Author: John McQuah
target=$1
fullpath="$2/$target"
if [ -r "$target" ]; then
[ -n "$(ps --no-header -C deadbeef-main)" ] || exit 0
[ -f "$target" ] && deadbeef --queue -- "$fullpath" 2>/dev/null
2022-12-28 21:12:43 -05:00
[ -d "$target" ] && find "$fullpath" -iname "*.mp3" \
-o -iname "*.ogg" -o -iname "*.flac" \
-o -iname "*.m4a" -o -iname "*.mid" -print0 \
| sort -z | xargs deadbeef --queue -- 2>/dev/null
2022-02-26 14:04:55 -05:00
fi