mpv
                                
                                 mpv copied to clipboard
                                
                                    mpv copied to clipboard
                            
                            
                            
                        Add filename support for --playlist-start
Before requesting a new feature make sure it hasn't been requested yet. https://github.com/mpv-player/mpv/labels/meta%3Afeature-request
Expected behavior of the wanted feature
--playlist-start only supports index and auto, but when I open a playlist, I need the playlist to be sorted by mtime. I can use ls -t | mpv --playlist=- to do that, but I need to start from the specific file instead of the first one if not providing index for --playlist-start, fetching the index is not easy, passing the file to it is easier.
Most of the time I use mpv to open a file inside ranger using Enter or Right key on a video file, the files list in the directory are sorted by mtime, and I hope to open a video file and the playlist is sorted by mtime like my ranger does.
Changing the line in ~/.config/ranger/rifle.conf:
mime ^video,        has mpv,      X, flag f = mpv -- "$@"
to
mime ^video,        has mpv,      X, flag f = /bin/ls -t | mpv --playlist=- -- "$@"
is ok for playlist to be sorted my mtime, but mpv won't play the video file when I hit Enter or Right key, and --playlist-start=10 doesn't seem to work.
If anyone can get an easy solution instead implementing filename for --playlist-start, it would be also OK.
Alternative behavior of the wanted feature
Log file
Even if you think it's not necessary at first, it might help us later to find possible issues. Make a log file made with -v -v or --log-file=output.txt, paste it to https://0x0.st/ or attach it to the github issue, and replace this text with a link to it.