I try to create a mpv playlist with 5 most recent movies in a specific folder - add to playlist (creation date).
Not successful ❌ was those commands:
mpv --playlist | ls -lrt1 /home/Georgette/Downloads/Bridgerton | tail -n 5
mpv --playlist=$(ls -lrt1 /home/Georgette/Downloads/Bridgerton | tail -n 5)
Update after comment (thanks!):
mpv $(ls -lrt1 /home/Georgette/Downloads/Bridgerton | tail -n5) is working but has problems with spaces and other stuff in filenames: [file] Cannot open file 'zzz': No such file or directory. So there is still a quoting problem.
--playlistcommand expects an existing playlist file. Have you tried just passing the list of files (the second variant without--playlist)? The first command does not make any sense by the way. – Hermann Feb 04 '23 at 11:23