Commit Graph

246 Commits

Author SHA1 Message Date
christoph-heinrich
fd54373be8 fix: infinite margin on initialization (#362) 2023-01-30 14:41:05 +01:00
tomasklaen
543c4a71f1 feat: added autoload_types option
Controls what file types to look for when deciding next file to play.

Comma separated list of: `video`, `audio`, `image`, `subtitle`

closes #387
2023-01-30 12:57:05 +01:00
tomasklaen
54bb9d6a77 feat: split media_types option into video_types, audio_types, and image_types 2023-01-30 11:44:15 +01:00
tomasklaen
7647cac9f8 feat: trim unnecessary 00: from timestamps in durations shorter than an hour
closes #401
2023-01-30 10:58:22 +01:00
tomasklaen
9ebc600d37 feat: added show-submenu-blurred message listener
closes #441
2023-01-30 10:14:39 +01:00
tomasklaen
32cc283397 feat: flash top bar when new file is loaded
closes #380
2023-01-18 12:15:14 +01:00
tomasklaen
8183163f2a feat: added options to display alternative top bar title
Added option `top_bar_alt_title`, which accepts an alternative title template to be displayed, and `top_bar_alt_title_place` that controls where it should be displayed. It can be either `below` to place it below the main one, or `toggle` to show it in place of the main title when user clicks the top bar or calls the `toggle-title` binding.

The `top_bar_title` now also accepts a custom top bar title template if user wants it to be different from the one defined in `mpv.conf`.

closes #402
2023-01-18 12:06:10 +01:00
Tomas Klaen
c5ccd1b4ef feat: added an API to overwrite uosc key bindings (#430)
This allows 3rd party scripts to replace the handling of built in uosc key bindings with their own logic.

Example that replaces uosc's basic stream quality menu with christoph-heinrich/mpv-quality-menu:

```lua
mp.commandv('script-message-to', 'uosc', 'overwrite-binding', 'stream-quality', 'script-binding quality_menu/video_formats_toggle')
```
2023-01-18 09:48:31 +01:00
christoph-heinrich
11f9067182 fix: mouse-pos can be nil (#418) 2023-01-05 15:57:30 +01:00
christoph-heinrich
5a02c6d205 fix: touch input (#412)
`mouse-pos.hover` may or may not be false during touch input
(contrary to mouse input, where false means the cursor left the window)

Detecting a change to false as a leave event, while allowing any
other mouse-pos update to cause an enter event solves this.
2023-01-02 08:51:49 +01:00
Michael
e66c8fbf88 feat: added destination_time option and deprecated total_time (#399)
`destination_time` accepts one of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file).

`total_time` is deprecated, but still works as expected.
2022-12-27 09:17:12 +01:00
xfzv
ea371b5740 fix: add dts to media_types (#398) 2022-12-24 10:41:45 +01:00
dyphire
e33db65c1c feat: add use_trash option (#394) 2022-12-23 15:51:37 +01:00
tomasklaen
17c8ed6291 4.5.0 2022-12-07 18:14:11 +01:00
christoph-heinrich
4ef8ff55bb fix: always enabled cache triggering uncached ranges (#385) 2022-12-06 23:18:36 +01:00
christoph-heinrich
8b863a611f fix: osd resolution initializing incorrectly (#383)
* fix: only update resolution when it's > 0

* fix: only render after the resolution has been initialized

* chore: update type annotation to fix warning
2022-12-04 09:09:20 +01:00
tomasklaen
107e758144 fix: open-config-directory not opening correct folder on windows
closes #365
2022-11-11 09:45:14 +01:00
tomasklaen
5f5bf4b842 fix: file menu not updating active item and other menu issues
- Preselecting previous folder wasn't working sometimes.
- `join_path()` didn't account for drive letters already having a separator.

Also refactors how `open_file_navigation_menu()` stores menu items value. As a side effect this is now a lot faster as we don't have to serialize each item's path into meta table, but instead we now store just a path string and handle it as needed.

closes #355
2022-10-31 11:10:25 +01:00
tomasklaen
e8060c74ad refactor: don't overwrite default libraries and expose join_path() and path_separator() types 2022-10-31 09:47:46 +01:00
tomasklaen
64feeb04b7 4.4.0 2022-10-28 22:25:04 +02:00
tomasklaen
b5ca97adcf feat: add timeline_cache option to disable cache indicators
ref #351
2022-10-27 21:35:56 +02:00
tomasklaen
8538d6a177 perf: optimize reading directories
Instead of calling `utils.readdir()` twice to get directories and files, we now read the directory only once and sort it by item type. Also optimizes extension checking.

ref #344
2022-10-27 13:25:02 +02:00
tomasklaen
4399904bba refactor: change directory structure to support mpv 0.32 and lower 2022-10-27 12:09:59 +02:00
tomasklaen
c00e296953 refactor: modularize the codebase
Splits the monolith file into individual modules with as little code refactoring as possible.

Not too happy with it, mainly because of the weird language server behavior where it doesn't recognize types or variables unless the files defining them are open...

It'd also be better to refactor everything from the ground up to not depend on global variables but if I had that much time to invest I'd straight up just rewrite everything in typescript and use TS→Lua transpiler.
2022-10-25 12:14:50 +02:00
christoph-heinrich
e6ebb9c4e4 feat: better file sorting (#338) 2022-10-25 10:35:57 +02:00
christoph-heinrich
bef4a77139 feat: improved text width measuring (#322) 2022-10-25 10:21:28 +02:00
tomasklaen
26648f081a feat: smooth menu scrolling 2022-10-24 22:28:59 +02:00
christoph-heinrich
0f53516158 feat: drag to scroll for menu (#331)
Co-authored-by: tomasklaen <tomas.klaen@gmail.com>
2022-10-24 22:17:20 +02:00
Zhong Lufan
2e281b51a2 fix: urls without slashes not recognized as urls (#336) 2022-10-20 22:32:22 +02:00
Hikari
1c5a061388 fix: pause while dragging the timeline (#335) 2022-10-20 19:49:09 +02:00
christoph-heinrich
f4e0d2ba49 fix: touch input (#327) 2022-10-15 10:49:51 +02:00
christoph-heinrich
0f964879b2 fix: spacing and clipping in menu (#325)
Puts clipping position right in the middle of the spacing between title
and hint. This gives us a little bit more leeway to prevent clipping from
inaccurate width estimation.

Also now only adds spacing where necessary.
2022-10-15 10:40:53 +02:00
christoph-heinrich
df3c2ec14c fix: use ass_safe_title (#328)
It was created but not used
2022-10-15 10:40:27 +02:00
christoph-heinrich
9516325ba8 fix: menu title/hint clipping (#321) 2022-10-13 11:13:54 +02:00
christoph-heinrich
fa049a1cfa fix: buffered time x bounds calculation (#323) 2022-10-13 11:05:29 +02:00
christoph-heinrich
34b9b59603 fix: don't render empty title (#319) 2022-10-12 08:43:12 +02:00
christoph-heinrich
2c4cfd70ee fix: properly update title (#318)
Get the properties relevant to the title, observe and update based on
their changes.
2022-10-12 08:41:39 +02:00
tomasklaen
5995bfb7ae feat: implement set-min-visibility message listener
closes #317
2022-10-11 17:55:35 +02:00
tomasklaen
2fb5ff69a8 4.3.0 2022-10-11 13:02:45 +02:00
tomasklaen
ef1753e27e feat: update default menu items 2022-10-11 12:12:51 +02:00
tomasklaen
629617117f tweak: thumbnail border opacity 2022-10-11 10:58:37 +02:00
tomasklaen
66a29d67f9 refactor: title template updating
closes #312
2022-10-11 10:23:23 +02:00
Hikari
840181825c fix: menu parser not ignoring other comments (#315) 2022-10-11 09:43:03 +02:00
tomasklaen
3aa0ae6584 fix: remove debugging prints 2022-10-10 10:44:45 +02:00
tomasklaen
be1b978528 fix: title initializing prematurely and not accounting for dynamic variables
ref #312
2022-10-10 10:40:22 +02:00
tomasklaen
30a3ec195d feat: move @ in control badge props from prefix to suffix for consistency
The old `@prop` syntax will still work, but consider it deprecated.
2022-10-10 10:20:46 +02:00
tomasklaen
75ab13f2e3 feat: make toggle and cycle controls work with external properties
ref #310
2022-10-10 09:56:16 +02:00
tomasklaen
7d2c59bb51 fix: title not escaping ass tags from filenames
closes #314
2022-10-10 09:09:03 +02:00
tomasklaen
993cfa5d21 tweak: click_threshold descrition and top bar subtitle offset 2022-10-10 09:02:57 +02:00
christoph-heinrich
d3f25af012 fix: options.click_threshold (#309) 2022-10-10 08:56:52 +02:00