|
|
@@ -10,7 +10,7 @@ GUIPLAYER="${GUIPLAYER}" |
|
|
|
NUMTRACKS="${NUMTRACKS:-100}" |
|
|
|
|
|
|
|
if [ ! -z "$GUIPLAYER" ]; then |
|
|
|
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf | head -n "$NUMTRACKS" | xargs -d "\n" "$GUIPLAYER" > /dev/null 2>&1 & |
|
|
|
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf -n "$NUMTRACKS" | xargs -d "\n" "$GUIPLAYER" > /dev/null 2>&1 & |
|
|
|
|
|
|
|
# detach the player |
|
|
|
sleep 1 |
|
|
@@ -26,7 +26,7 @@ elif which mocp >/dev/null 2>&1; then |
|
|
|
state=$(mocp -i | grep "State:" | cut -d' ' -f2) |
|
|
|
if [ "$state" = 'PLAY' ]; then |
|
|
|
# add up to 100 random audio files |
|
|
|
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf | head -n "$NUMTRACKS" | xargs -d "\n" mocp -a |
|
|
|
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf -n "$NUMTRACKS" | xargs -d "\n" mocp -a |
|
|
|
exit |
|
|
|
fi |
|
|
|
fi |
|
|
@@ -35,7 +35,7 @@ elif which mocp >/dev/null 2>&1; then |
|
|
|
mocp -c |
|
|
|
|
|
|
|
# add up to 100 random audio files |
|
|
|
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf | head -n "$NUMTRACKS" | xargs -d "\n" mocp -a |
|
|
|
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.webm" -o -iname "*.wma" \) | shuf -n "$NUMTRACKS" | xargs -d "\n" mocp -a |
|
|
|
|
|
|
|
# start playing |
|
|
|
mocp -p |
|
|
|