if [ -x "/usr/bin/mplayer2" ]; then
player="/usr/bin/mplayer2"
fi
+if [ -x "/usr/bin/mpv" ]; then
+ player="/usr/bin/mpv"
+fi
playeropts=""
$player -af help | grep -q bs2b && playeropts="${playeropts} -af-add bs2b"
# Create playlist
find "$@" -maxdepth $maxlevel -type f \
-iname "*.mp3" -or -iname "*.avi" -or -iname "*.flv" \
- -or -iname "*.mp4" -or -iname "*.ogg" \
+ -or -iname "*.mp4" -or -iname "*.ogg" -or -iname "*.m4a" \
| sort > $playlist
[ "$optSorttime" == "1" ] && cat "$playlist" | xargs ls --sort=time | sponge "$playlist"