mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Let mocp shuffle
This commit is contained in:
parent
35fb89b972
commit
187750556c
|
@ -5,9 +5,7 @@
|
||||||
# Notes:
|
# Notes:
|
||||||
# - if selection is available, plays it, else plays the current file or directory
|
# - if selection is available, plays it, else plays the current file or directory
|
||||||
# - appends tracks and exits is MOC is running, else clears playlist and adds tracks
|
# - appends tracks and exits is MOC is running, else clears playlist and adds tracks
|
||||||
# - to randomize the order of files appended to the playlist, set SHUFFLE=1
|
# - to let mocp shuffle tracks, set SHUFFLE=1
|
||||||
# if you add a directory with many files when SHUFFLE=1 is set, it might take a very long time to finish!
|
|
||||||
# - max 100 files are added
|
|
||||||
#
|
#
|
||||||
# Shell: POSIX compliant
|
# Shell: POSIX compliant
|
||||||
# Author: Arun Prakash Jana, ath3
|
# Author: Arun Prakash Jana, ath3
|
||||||
|
@ -37,7 +35,8 @@ mocp_add ()
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "$arr2" | shuf -n 100 | xargs -n1 -d "\n" mocp -a
|
mocp -o shuffle
|
||||||
|
echo "$arr2" | xargs -d "\n" mocp -a
|
||||||
else
|
else
|
||||||
if [ "$resp" = "y" ]; then
|
if [ "$resp" = "y" ]; then
|
||||||
xargs < "$selection" -0 mocp -a
|
xargs < "$selection" -0 mocp -a
|
||||||
|
|
Loading…
Reference in a new issue