jonniek / mpv-nextfile

Mpv script to open next or previous file in directory
The Unlicense
66 stars 9 forks source link

Sorting issue #21

Open Ejz85 opened 1 year ago

Ejz85 commented 1 year ago

If I have a folder with a bunch of files, videos and pictures and sort them by size and play the first one, the player does not play them in order. Not sure what it does, seems random and also it just randomly stops without playing all of the files in the folder.

Windows, latest version.

jonniek commented 1 year ago

This script cannot know how you have ordered the directory in some other software like explorer. It will try to play files in alphabetical order.

I would recommend opening all the files from the directory into a playlist and sorting them. You can do this with autoload or my https://github.com/jonniek/mpv-playlistmanager script.

Ejz85 commented 1 year ago

Hm I see.. MPC can do it tho. Is there a limitation in MPV that MPC does not have? Even Movies & TV (the windows app) does it well.

Would a script be able to create a playlist using the order of the files in the folder once I play a video from that folder? Like you suggested, but instead the script would start the playlist creation on playing the first video?

I dont even know how to create a playlist in MPV. Like If I select all files in the folder and right-click there is no option to play all? :P

jonniek commented 1 year ago

I think the other apps maybe have more native access to the OS. Tecnically it might be possible to do with powershell scripting but I don't have a windows machine right now to develop and test with. The updated mpv API might also be able to do it, I have another issue open about that.

I dont even know how to create a playlist in MPV

For example in playlistmanager bind a key for key_loadfiles and key_sortplaylist. Then after opening one file from the directory press the load keybind, and then sort it in the way you want.