Here is my solution for playing all files in a directory and all subdirectories with
ranger in random order. It's is not exactly the answer to the question, but maybe you can expand it.
First I wrote a shell script called
if [[ -z "$1" ]]; then
echo "usage: $(basename $0) directory [count]"
if [[ ! -z "$2" ]]; then
find "$CWD" -type f -iname \*.mkv -or -iname \*.mp4 -or -iname \*.avi | shuf $SHUFPARAM > $PLAYLIST && \
mplayer2 --playlist=$PLAYLIST && rm -f $PLAYLIST
This script finds all my movie files in a given directory, creates a random ordered playlist and calls
mplayer2 with this generated playlist. Leave the
shuf command out, if you want a sorted list.
Next step is to edit
rifle.conf in your settings directory (
~/.config/ranger). Add this line:
directory, label pseudoTV, has mplayer2, flag f = /path/to/ptv "$@"
Now you can use the script to
open_with (mapped to key:
mplayer2 you can navigate with
> between the playlist items.
TIP: Copy your directories directories to the
yank_buffer and save it in
ranger. Then expand
ptv to find files in all your selected directories...