17 lines
398 B
Bash
Executable File
17 lines
398 B
Bash
Executable File
#!/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
|
|
[ -d "$target" ] && deadbeef --queue -- "$fullpath"/* 2>/dev/null
|
|
fi
|