When I originally added this feature, I overlooked that this was actually different from UI localization.
It has different usage scenarios: UI main language and romanization files can be separated
* feat: `set-button` API for scripts to add custom control bar buttons
Adds `set-button <name> <data_json>` message external scripts can send to add or update buttons whose state, look, and click action is defined by `data_json`.
Users can then add this button into their controls bar with `button:<name>` syntax.
closes#935
Listening to `primary_down`, but not listening to the `primary_up` event
leads to that `up` event getting forwarded. Listening to `primary_click`
instead avoids that problem.
Seeking chapters now happens on button up instead of button down, but
that shouldn't be a problem for anyone and makes their behavior
consistent with other clickable UI elements.
ref. https://github.com/tomasklaen/uosc/discussions/931
Opening a playlist with loadfile can lead to problems like autoload.lua
populating the playlist with other files that were in the same directory
as the playlist file.
To avoid that the command loadlist can be used to avoid having mpv treat
the file like any other, just to notice during demuxing that it is a
playlist.
So far the file navigation menu would only show media files and
directories, but opening playlist files via that menu is a valid use
case as well.
From a quick look at demux_playlist.c and a bit of testing, those seem
to be the only playlist formats mpv supports.
mpv can also open .txt files as playlists, but they need to be provided
via the --playlist=<path> argument and thus don't work here.
ref. https://github.com/tomasklaen/uosc/discussions/926
mpv upstream commit mpv-player/mpv@ab3b174 has introduced support for BCP 47 language tags,
and now track lang has uppercase and lowercase content.
Also avoids showing the selection status of secondary subtitle in the subtitle menu at the same time.
Caching the zero represenation sounds like a good idea, until the
precision gets changed and then e.g. 01:40:23.13 returns -00:00:00.0
because it has the same amount of characters, messing up our width
estimation and pseudo monospace thingy.
Clearing the cache on options change avoids such conflicts.
Fixes#834
There's a lot of `title-bar` interaction weirdness on windows. When disabling it on newer mpv versions, one version hides borders, other doesn't. So let's just pretend this setting does what it's supposed to and what everyone would expect, and only hides the title bar without touching the border. People can always disable uosc's window border with other options if they need to.
This is useful when running on a platform builds of `ziggy` aren't provided for
... or when using a distro-provided build.
The idea for this patch originated in NixOS/nixpkgs#270962,
as it needed a way to point `uosc` at the nix-managed build of `ziggy`.
The element id didn't match the id in the constructors table or the
description in the config. Consequently it was possible to disable the
indicator at startup, but once it was instantiated it wasn't possible to
remove it again.
Fixes#808