[MPlayer-dev-eng] [PATCH] Make mplayer able to handle directories
Etienne Buira
etienne.buira at free.fr
Thu Mar 10 17:13:08 CET 2011
On Thu, Mar 10, 2011 at 10:19:11AM +0100, theo wrote:
> Hi,
>
> Please find attached a patch that makes mplayer able to recursively add
> files within a directory (or within the directories within) to the
> play-list.
>
> That is I can now do:
> mplayer -shuffle $HOME/music
> instead of zsh's
> mplayer -shuffle $HOME/music/**
> or
> mplayer -shuffle $HOME/music/* $HOME/music/*/* $HOME/music/*/*/* etc.
> or
> mplayer -shuffle $(find -type f $HOME/music)
> on other shells. But the later sometimes conflicts with the ability to
> command mplayer with the keyboard.
Hi.
An hackish way that requires no modification is:
{ find $HOME/music/ -type f -print0 | shuf -z | xargs -0 sh -c 'exec mplayer
"$@" <&3 3<&-' ; } 3<&0
But sure, it doesn't look very nice.
More information about the MPlayer-dev-eng
mailing list