68 Commits

Author SHA1 Message Date
tomasklaen
ade1d1f319 feat: dropped compatibility for mpv 0.32 and below
closes #359
2023-07-18 18:21:00 +02:00
natural-harmonia-gropius
3c70ffd927 feat: internationalization (#518)
Adds `languages` option to specify localization language priority.
Built in languages can be found in `scripts/uosc_shared/intl`.
2023-04-24 11:37:58 +02:00
christoph-heinrich
6d58ef4c99 feat: apply margin to osd-margin-* (#499)
* feat: apply margin to `osd-margin-y` and `osd-margin-x`

The margins were already set for `osc-margins` and
`user-data/osc/margins`, but osd messages have their own properties
`osd-margin-x` and `osd-margin-y`.
Offsetting `osd-margin-x` and `osd-margin-y` by our margin prevents
overlap of osd messages with the GUI.
2023-04-09 08:48:15 +02:00
xfzv
1ed8a7a823 fix: add ac3 to audio types (#468) 2023-03-04 16:20:51 +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
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
Till
ed58830ca7 docs: minor additions and cleanup (#428) 2023-01-14 11:34:56 +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
b5ca97adcf feat: add timeline_cache option to disable cache indicators
ref #351
2022-10-27 21:35:56 +02:00
christoph-heinrich
bef4a77139 feat: improved text width measuring (#322) 2022-10-25 10:21:28 +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
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
tomasklaen
46ab864adc docs: clarify shuffle control and option descriptions
ref #310
2022-10-09 12:07:11 +02:00
tomasklaen
e94f9bf290 feat: implement click_threshold and click_command options
Deprecates `pause_on_click_shorter_than`.
2022-10-08 09:04:54 +02:00
christoph-heinrich
93bb49edce feat: automatically choose between fast and exact seeking (#302) 2022-10-07 23:04:51 +02:00
tomasklaen
983c389a4f feat: add timeline_drag_seek_keyframes option
Makes dragging in timeline use faster seeking to keyframes. Disabled by default.
2022-10-06 22:40:01 +02:00
tomasklaen
87a66b7378 revert: restore *_text color options
I've changed my mind :x Seen a screenshot with a valid use case for tweaking these.
2022-10-06 11:18:33 +02:00
tomasklaen
f9981ce58f feat: replace *_text color options with contrasting color detection
ref #294
2022-10-05 10:22:26 +02:00
dyphire
b194618e98 feat: add editions menu,editions control and has_many_editon disposition (#277) 2022-09-30 10:22:36 +02:00
hooke007
69eef3432f feat: show vids icon if the current file contains multi vid-tracks (#273) 2022-09-28 08:46:52 +02:00
hooke007
d304022c9e feat: make *_persistency support idle (#274) 2022-09-28 08:46:19 +02:00
dyphire
b8a37ef576 feat: add is_idle disposition (#271) 2022-09-27 20:21:47 +02:00
hooke007
bb0d1ace0d fix: a couple config defaults not matching script defaults (#265) 2022-09-25 09:54:25 +02:00
tomasklaen
f27e17e7dc feat!: removed wasd and hjkl menu navigation 2022-09-24 01:16:06 +02:00
tomasklaen
6ef4a2a53a tweak: colors 2022-09-23 16:58:24 +02:00
tomasklaen
810616a131 feat: implement chapter_range_patterns option
Effectively facilitates localization of simple chapter ranges.

ref #247
2022-09-23 16:15:11 +02:00
tomasklaen
850563dbef feat: implemented buffered_time_threshold option 2022-09-23 14:45:31 +02:00
dyphire
9bc72328f0 fix: improve formats in media types (#249) 2022-09-23 14:15:17 +02:00
tomasklaen
eca7836889 feat: split intros & outros into their own chapter range types
ref #163
2022-09-23 12:34:33 +02:00
tomasklaen
de41a10c07 feat: implemented menu-blurred command
Opens a menu without preselecting any item. Suitable when opening menu with a mouse input.

closes #248
2022-09-23 12:28:05 +02:00
tomasklaen
612e2a5cc4 refactor: renamed next_file_on_end to autoload 2022-09-23 11:59:00 +02:00
tomasklaen
3226a0d33e fix: improve file-end event detection
closes #235
2022-09-23 11:51:49 +02:00
tomasklaen
e05c6b6749 feat: removed directory_navigation_loops option in favor of loop-playlist
This is behavior is now controlled by mpv's `loop-playlist` property.
2022-09-23 09:32:06 +02:00
tomasklaen
d2dd7e4415 feat: implemented shuffle and next_file_on_end options
The `shuffle` option built into mpv doesn't shuffle playlist playback, but instead just randomizes the order of every new opened playlist. So when you enable this after opening a playlist, it does nothing. If you enable it before opening a playlist, it'll randomize its list order, so you can't browse alphabetically. None wants this, none expects this. And since its is expected from a ui such as uosc to provide a shuffle button that works like in any other media player on the planet, I had to simulate it.

It decides on the next file 300ms before the end, so it can potentially cut out punchlines from short videos such as those from r/perfectlycutscreams. But this is necessary because a lot of files actually end like ~100ms or more before their duration, but on corrupted files or files where stream ended prematurely, this can happen way before that. If file is force ended by mpv before our timer kicks in, our simulated `file-end` event won't fire, and uosc is unable to take over to decide to play the next one.

I couldn't figure out a better way to implement this. There's no 'fil-reached-end' even in mpv. There are only 'im-unloading-the-file' events (`file-end`, `on_unload`, ... etc), which is useless here because it triggers even when user opens a different file during playback.

Implementing `shuffle` allowed for trivial `next_file_on_end`, so that got added as well. It load next file in directory when current file ends.

Directory navigation now also adheres to `shuffle` uosc option, and `playlist-loop`, `playlist-repeat`, & `loop-file` mpv options.

Additionally, the `<has_playlist>` disposition was removed from the `shuffle` and `loop-playlist` control bar buttons as they now affect directory navigation as well.

closes #235
2022-09-22 14:57:54 +02:00
tomasklaen
2adfc36c24 feat: add top_bar_title_opacity option
ref #237
2022-09-21 23:18:01 +02:00
tomasklaen
a4638fcdef feat!: improve chapter ranges serialization
Users can no longer create their own or edit existing chapter range serializers, but that was always very limited and prone to errors. Instead, all common use cases for chapter ranges: intros/openings, outros/endings, and sponsor blocks serializers are now internal.

Users can still disable and configure colors for each individual serializer by specifying a `{type}:{color}` pairs delimited by a comma on a `chapter_ranges` property. The color is now an RGB(A) HEX code.
2022-09-21 22:58:00 +02:00
tomasklaen
a03fe26f38 refactor: update default controls bar and its dispositions 2022-09-21 14:55:05 +02:00
tomasklaen
6d54e0fdfe fix: speed_opacity option being ignored
closes #231
2022-09-21 14:10:59 +02:00
tomasklaen
a4257d7c31 feat!: accept colors in RGB(A) HEX format
Affects options `foreground`, `foreground_text`, `background`, `background_text`.

Other configurable colors will follow suit in next commits.
2022-09-21 14:02:43 +02:00
dyphire
6ac00f9115 fix: add .vob and .lrc in *_types (#224) 2022-09-20 12:24:14 +02:00
hooke007
4dc4a8ee3d fix: add more formats in *_types (#220) 2022-09-19 23:43:45 +02:00
tomasklaen
ed8cb8741e feat: added has_many_* disposition types
Adds `has_many_audio`, `has_many_sub`, and `has_many_video` disposition types that can
be used when constructing the controls bar.

The audio track selector button now has a `<has_many_audio>` disposition instead of the old `<has_audio,!audio>`.
2022-09-19 23:42:32 +02:00
tomasklaen
5d92c73481 feat: added control bar button badge limits
It is now possible to specify a threshold when to hide the badge by doing `#audio>1` to display the audio counter badge only when there's more than 1 audio track.

ref #212
2022-09-19 22:08:13 +02:00
Zhong Lufan
3fcafbd64a fix: add .mka to media types (#219) 2022-09-19 21:15:16 +02:00
tomasklaen
fca0dff196 feat: improved top bar playlist position indicator
Also removes the counter from built-in playlist related control buttons, as big playlists create badges that are too big and overlap/overflow the button too much. And having the counter there will make people ask for position (understandable), which would further worsen this problem. Better to have it in the top bar.

ref #212
2022-09-19 17:18:13 +02:00
tomasklaen
c8f4f22d15 feat: added counters and other badges to control buttons
Implements control element `#{badge}` syntax. Example:

```
command:subtitles:script-binding uosc/subtitles#sub?Subtitles
```

ref #212
2022-09-19 14:47:14 +02:00