aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mocplay
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-27 08:23:22 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-27 08:23:22 +0530
commit187750556c9b8770cb335978674383c4bfbcb5b5 (patch)
tree61b8ffe7e4b72b056a8b5f7dde2170a6efc4d48c /plugins/mocplay
parent35fb89b9726d9618a866471559b6d253b1d8e676 (diff)
downloadnnn-187750556c9b8770cb335978674383c4bfbcb5b5.tar.gz
Let mocp shuffle
Diffstat (limited to 'plugins/mocplay')
-rwxr-xr-xplugins/mocplay7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/mocplay b/plugins/mocplay
index 1c0df2a..6739c55 100755
--- a/plugins/mocplay
+++ b/plugins/mocplay
@@ -5,9 +5,7 @@
# Notes:
# - 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
-# - to randomize the order of files appended to the playlist, 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
+# - to let mocp shuffle tracks, set SHUFFLE=1
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana, ath3
@@ -37,7 +35,8 @@ mocp_add ()
fi
done
- echo "$arr2" | shuf -n 100 | xargs -n1 -d "\n" mocp -a
+ mocp -o shuffle
+ echo "$arr2" | xargs -d "\n" mocp -a
else
if [ "$resp" = "y" ]; then
xargs < "$selection" -0 mocp -a