So if OS is Windows and mpv builds with luaJIT, we can use the win32 API to ensure that the sorting in playlistmanager is exactly the same as Windows Explorer, \
otherwise, use the default sorting function alphanumsort().
In playlistmanager after using StrCmpLogicalW sort
The current sorting function
alphanumsort()
is very different from the sorting in Windows Explorer. For Example:Microsoft does not open source the sorting algorithm, but does provide the API, see StrCmpLogicalW.
Fortunately, LuaJIT can call Windows API, and most popular mpv windows build are builds with LuaJIT, such as shinchiro/mpv-winbuild-cmake.
So if OS is Windows and mpv builds with luaJIT, we can use the win32 API to ensure that the sorting in playlistmanager is exactly the same as Windows Explorer, \ otherwise, use the default sorting function
alphanumsort()
.StrCmpLogicalW
sort