925 Commits

Author SHA1 Message Date
Sneakpeakcss
78061a7dc6 fix: show-in-directory issue opening paths containing a comma (win) (#800)
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
2023-12-06 22:36:14 +01:00
christoph-heinrich
96b57b259e fix: make maximize workaround windows specific (#795) 2023-11-15 20:14:10 +01:00
christoph-heinrich
210a1216fe fix: locale parsing related crash on some mpv builds (#794)
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.
2023-11-13 18:58:43 +01:00
tomasklaen
28e968450f docs: clarified how to configure fetched languages in download-subtitles menu
closes #791
2023-11-12 19:13:31 +01:00
tomasklaen
55938d467a docs: updated faq with antivirus issue info 2023-11-10 10:02:55 +01:00
tomasklaen
1f4b7294b6 5.1.1 2023-11-10 09:30:52 +01:00
Tomas Klaen
c1828231ed chore: update screenshot in readme 2023-11-09 13:20:51 +01:00
tomasklaen
9cebb07fcb 5.1.0 2023-11-09 10:39:45 +01:00
tomasklaen
6d329f959b tweak: chapter indicator sizing 2023-11-09 10:39:22 +01:00
christoph-heinrich
38e68e1771 fix: scroll parent menus when opening menu by id (#780) 2023-11-09 09:33:25 +01:00
christoph-heinrich
a9c83bb73b tweak: always scroll to selected index on menu open (#779)
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.
2023-11-09 09:31:56 +01:00
christoph-heinrich
8df5ea6efd fix: don't cause a fling in update_dimensions() (#778)
Opening a large menu with a selected item would not scroll
all the way to that selected item if there was a menu update during the
initial fling.
2023-11-09 09:30:30 +01:00
tomasklaen
0531659397 fix: controls couldn't cycle some mpv properties
closes #777
2023-11-07 15:10:39 +01:00
christoph-heinrich
ed42152bb8 fix: menu config with mpv.net (#776)
mpv.net v7 returns the whole input.conf content instead of the path for
the `input-conf` property.
2023-11-06 18:51:00 +01:00
tomasklaen
9c087efbb5 feat: added playlist_position to configurable opacity properties
closes #774
2023-11-06 09:14:04 +01:00
christoph-heinrich
c3e5bb2270 fix: only autohide UI when the cursor autohides (#771)
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.
2023-11-06 09:07:23 +01:00
christoph-heinrich
26d71a8630 fix: correctly update proximities on mouse enter and record position (#772)
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.
2023-11-05 11:37:32 +01:00
christoph-heinrich
a7ee37c1d7 refactor: remove check before adding 0.5 to cursor position (#770)
math.huge + 0.5 == math.huge
2023-11-05 11:24:25 +01:00
tomasklaen
650118ebbd docs: clarify how to control autohide timing 2023-11-04 19:58:08 +01:00
tomasklaen
d8044770ee tweak: bumped timeline cursor line opacity
ref #722
2023-11-04 19:45:58 +01:00
tomasklaen
bd068c9cd0 feat: added controls to configurable opacity properties
Changes background opacity of control buttons. Default is `0`.

ref #722
2023-11-04 19:38:15 +01:00
tomasklaen
c9826221d0 fix: autoload looping a file when only a single file in directory
closes #768
2023-11-04 19:05:14 +01:00
tomasklaen
37675d0f55 feat: allow pasting to start search
closes #767
2023-11-04 18:54:40 +01:00
tomasklaen
8d2dfc4b00 build: fixed packaging tool reporting total instead of compressed size 2023-11-04 18:41:26 +01:00
tomasklaen
a8f040af0d perf: speed up ziggy initialization by using less aggressive binary compression 2023-11-04 15:02:45 +01:00
tomasklaen
c18b374d32 docs: add faq 2023-11-04 15:01:06 +01:00
tomasklaen
de85bdebcf fix: loading same track twice would add a duplicate entry
Loading the same track now selects it if it wasn't already instead of loading a duplicate entry.
2023-11-04 13:02:14 +01:00
tomasklaen
81f402ad73 feat: support for paste in menus
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
2023-11-04 12:22:23 +01:00
tomasklaen
4cdd6c585d fix: menu separators and scrollbar not scaling properly
closes #764
2023-11-03 15:06:13 +01:00
tomasklaen
76b5fbe911 fix: dynamic control shrinking would not subtract spacing
ref #740
2023-11-03 11:21:45 +01:00
christoph-heinrich
f1c41a57fa fix: keep selected index on menu update during search (#759) 2023-11-03 09:57:01 +01:00
christoph-heinrich
448d408d1a tweak: update scroll position when moving items like when navigating (#763) 2023-11-03 09:51:14 +01:00
dyphire
d2885dd279 fix: update simplified chinese translation (#748) 2023-11-01 18:55:39 +01:00
christoph-heinrich
0a1b42936e fix: update german translation (#747) 2023-11-01 18:55:19 +01:00
tomasklaen
88e15cac57 build: fix ziggy build on unix
ref #744
2023-11-01 18:11:31 +01:00
tomasklaen
b8280b0004 feat: control gaps now shrink when not enough space
closes #740
2023-11-01 14:49:24 +01:00
tomasklaen
16f61eb497 fix: manual pause indicator initializes as static when launched with --pause
Also refactored/simplified PauseIndicator a bit.

closes #743
2023-11-01 12:55:17 +01:00
tomasklaen
b862387bec tweak: tweaked subtitle downloader messages 2023-11-01 12:12:33 +01:00
tomasklaen
c173641ea5 chore: restructured repo to eliminate dist directory
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...
2023-11-01 11:08:23 +01:00
christoph-heinrich
16e8ca3689 build: fixed unix build script syntax (#758) 2023-11-01 10:55:41 +01:00
Tomas Klaen
542f0db0fc feat: added menu for downloading subtitles from opensubtitles.com (#756)
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.
2023-10-31 17:21:23 +01:00
tomasklaen
13eb2dc137 feat(api): replaced menu palette option with search_style
`search_style` can be `'on_demand'` (current default), `'palette'`, or a new state `'disabled'` where menu can't be searched.
2023-10-31 16:46:15 +01:00
christoph-heinrich
6cbf0731f3 fix: timestamp shifting due to non monospace font (#752) 2023-10-31 15:39:37 +01:00
christoph-heinrich
bf7f970295 fix: allow a volume border of 0 (#749)
ref. https://github.com/tomasklaen/uosc/issues/722#issuecomment-1783866244
2023-10-30 18:16:32 +01:00
christoph-heinrich
4f091d30e7 fix: scale timeline timestaps border and margin (#751) 2023-10-30 18:13:52 +01:00
christoph-heinrich
28878e425a fix: add padding to menu width calculation (#755) 2023-10-30 18:12:46 +01:00
tomasklaen
55789e1d32 fix: menus crash when ctrl+backspace pressed while input is empty
Closes #745
2023-10-28 09:36:38 +02:00
Tomas Klaen
656ddcfb9b build: added building, packaging, and localization tools (#744)
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.
2023-10-28 09:20:56 +02:00
christoph-heinrich
ed6dcbe085 fix: runtime updates for progress option (#739) 2023-10-25 23:23:34 +02:00
tomasklaen
6dc4c30eaf refactor: no dynamic localization calls 2023-10-25 19:51:45 +02:00