sad

simple audio daemon
git clone git://git.2f30.org/sad
Log | Files | Refs | LICENSE

commit 975c54620afb032cc9564f806757e1a0d2077c21
parent 29a81782e752a5ee6a10cbe72c2e60d1c692f138
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 28 Dec 2014 23:18:58 +0100

scripts/sad-add: change to library "learn"

Diffstat:
Mscripts/sad-add | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/sad-add b/scripts/sad-add @@ -12,8 +12,14 @@ while read -r p; do \( -iname "*.mp3" -or \ -iname "*.ogg" -or \ -iname "*.wav" \) \ - -exec printf 'add %s\n' {} \; | \ + -exec echo learn {} \; | \ nc -U "$sock" done <<!__EOF__ $paths !__EOF__ + +# add library to playlist. +echo "library" | nc -U "$sock" | while read -r song; do + id=$(printf '%s' "$song" | cut -d ':' -f 1) + echo "add" "$id" +done | nc -U "$sock"