mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.38k stars 2.91k forks source link

--shuffle option doesn't work as expected when multiple dirs passed #7922

Open adrianopol opened 4 years ago

adrianopol commented 4 years ago

Environment

Reproduction steps

Run mpv --shuffle dir1 dir2 dir3.

Expected behavior

mpv takes all files from dir{1,2,3} recursively and shuffles them before playing.

Actual behavior

mpv takes random directory among dir{1,2,3}, shuffles files in it, and plays. Then takes another directory, and so on.

Log file

mpv.log.gz

UnkwUsr commented 5 months ago

Looks similar to https://github.com/mpv-player/mpv/issues/3134 ? I'm not saying this should be closed as "won't fix" too. Just linking related things. P.S. also, if anyone have workaround solution (like user script, maybe?) I would very appreciate sharing it

UnkwUsr commented 5 months ago

UPD: seems I found workaround: using find/fd utility to list all files, which makes single flat playlist.

fd -tf --exec-batch mpv
guidocella commented 5 months ago

mpv --shuffle dir1 --playlist=dir2 --playlist=dir3 is a workaround.

UnkwUsr commented 5 months ago

mpv --shuffle dir1 --playlist=dir2 --playlist=dir3 is a workaround.

@guidocella what if dir2 have subdirs let's say dir4 and dir5, and moreover dir4 also have some subdirs... ?

guidocella commented 5 months ago

They get expanded.