On Windows trying to open a path that contains a comma fails unless there's a space anywhere in the path, adding a trailing space to the end of it doesn't seem to bother explorer /select, and forces proper quotations.
Here's a bit more detail about this https://github.com/mpvnet-player/mpv.net/issues/580#issuecomment-1819365741
The # operator produces different results on luajit to the
interpreter for lists like `{1, nil, 3}`.
The interpreter gives a size of 3, while luajit says it's 1.
That caused `table_assign` and `itable_join` to behave differently depending
on the lua environment they're running in.
To get the total number of vararg arguments, `select('#', ...)`` can be
used, which doesn't stop counting when it encounters `nil`.
Any error return nil.
I don't think there is currently a use case for this, but maybe there
will be at some point and it doesn't hurt.
This would enable scrolling to some item on menu open even with
`mouse_nav` set, but currently any place that can open a menu with
`selected_index` set doesn't have `mouse_nav` set.
The cursor isn't allowed to autohide while hovering elements, so the UI
shouldn't autohide either. Otherwise this leads to the situation where
the UI autohides while e.g. hovering the timeline, and then the
cursor autohides afterwards because it's not hovering anything anymore.
Element:update_proximity() checks for cursor.hidden, which is why we have
to update that before updating the proximities.
Also it doesn't make sense to not record the first cursor position on
enter.
This adds several paste related features:
- You can paste into search input box.
- You can paste a url or a path into track select menus (subtitles/audio/video) to load it.
- Menu API now accepts `on_paste` option, which works the same as `on_search`.
closes#765, ref #497
As pointed out in #757, having scripts in `dist` would cause github's code indexing to ignore them.
This also updates packaging tool/scripts, which before wouldn't mark binaries placed inside `uosc.zip` as executable when built on windows. I can't believe there is no CLI tool on windows to do this and I had to write one in go...
New menu command `download-subtitles` which can also be opened by clicking on the **Download** option in the `subtitles` menu.
It uses a new `ziggy` binary which needs to be build with `tools/build ziggy` command.
ziggy will also hash the file and send the hash to Open Subtitles, so you can search even with empty query and if your file is known, you'll get results exactly for it.
The subtitle file is downloaded into the same directory as currently opened file, or `~~/subtitles` if URL is being played.
Main feature here is the `intl` tool that allows people to quickly create or update localization files with simple:
```
tools/intl de
```
This will parse the code for localization strings, and compare it against `de` locale, removing unused, and assigning `null` to new strings.
We can also make it even easier for people by running:
```
tools/intl all
```
after every localization string change in the codebase, which will update all existing locales so people can just browse through their ones and fill in nulls.