Releases: tomasklaen/uosc
5.1.0
Highlights
Subtitle downloader
Available under the Download option in subtitles
menu or with a direct download-subtitles
command is a new menu for downloading subtitles for current file.
The service we use is Open Subtitles, which has a 5 downloads per day limit for unauthenticated IPs. Authentication bumps this to 10, which is not much of a difference and adds a lot of hassles, so it's not implemented at this time. If you need to download more than 5 subs per day, you should probably just deal with it in the browser beforehand so you don't have to fiddle with the menu every time a new file starts.
Implementation will hash the current 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 subtitles exactly for it.
Subtitles will be downloaded to the same directory as currently opened file, or ~~/subtitles
(folder in your mpv config directory) if playing a URL.
Default styles tweak
Default border radius and menu padding was bumped a bit to better fit/match styles of environments uosc usually finds itself in (windows, gnome, macos,...). To revert it back where it was before, set this in your uosc.conf
:
menu_padding=2
border_radius=2
Release size increase clarification
The release size is now ~6 MB. This is because we are limited in what we can do in mpv's lua scripting environment, and to work around this, we now include a small binary tool (one for each platform), that we call to handle stuff we can't do in lua. Currently this means searching & downloading subtitles, accessing clipboard data, and in future might improve self updating, and potentially other things.
Other scripts usually choose to go the route of adding python scripts and requiring users to install the runtime. I don't like this as I want the installation process to be as seamless and as painless as possible. I also don't want to contribute to potential python version mismatch issues, because one tool depends on 2.7, other latest 3, and this one 3.9 only and no newer (real world scenario that happened to me), now have fun reconciling this. Depending on external runtimes can be a mess, and shipping a stable, tiny, and fast binary that users don't even have to know about is imo more preferable than having unstable external dependencies and additional installation steps that force everyone to install and manage hundreds of megabytes big runtimes in global PATH.
And the reason we don't split the release into uosc-{platform}.zip
that only includes binaries for the concerned platform is that then you wouldn't be able to sync your mpv config between platforms and everything just work. And the binaries are small, this is not a problem.
Changelog
Features
- Added
play-pause
control shorthand (1f26c3e) @tomasklaen - Added ukrainian translation (#728) (4123cbe) @Helltar
- Added
menu_padding
option (e5a1603) @tomasklaen - Replaced menu
palette
option withsearch_style
(13eb2dc) @tomasklaen - Added menu for downloading subtitles from opensubtitles.com (#756) (542f0db) @tomasklaen
- Control gaps now shrink when not enough space (b8280b0) @tomasklaen
- Support for paste in menus (81f402a) @tomasklaen
- Allow pasting to start search (37675d0) @tomasklaen
- Added
controls
to configurableopacity
properties (bd068c9) @tomasklaen - Added
playlist_position
to configurableopacity
properties (9c087ef) @tomasklaen
Fixes
- Font scaling in timeline (5e757b2) @tomasklaen
- Update simplified chinese translation (#725) (066a6dc) @dyphire
- Update german translation (#727) (192c3ef) @christoph-heinrich
delete-file-prev
not working as intended (#726) (d49f385) @christoph-heinrich- Timeline chapter indicators not scaling appropriately (6e19bee) @tomasklaen
- Update german translation (#731) (48f09ff) @christoph-heinrich
- Update simplified chinese translation (#734) (66f035b) @dyphire
- Runtime updates for progress option (#739) (ed6dcbe) @christoph-heinrich
- Menus crash when
ctrl+backspace
pressed while input is empty (55789e1) @tomasklaen - Add padding to menu width calculation (#755) (28878e4) @christoph-heinrich
- Scale timeline timestaps border and margin (#751) (4f091d3) @christoph-heinrich
- Allow a volume border of 0 (#749) (bf7f970) @christoph-heinrich
- Timestamp shifting due to non monospace font (#752) (6cbf073) @christoph-heinrich
manual
pause indicator initializes asstatic
when launched with--pause
(16f61eb) @tomasklaen- Update german translation (#747) (0a1b429) @christoph-heinrich
- Update simplified chinese translation (#748) (d2885dd) @dyphire
- Keep selected index on menu update during search (#759) (f1c41a5) @christoph-heinrich
- Dynamic control shrinking would not subtract spacing (76b5fbe) @tomasklaen
- Menu separators and scrollbar not scaling properly (4cdd6c5) @tomasklaen
- Loading same track twice would add a duplicate entry (de85bde) @tomasklaen
- Autoload looping a file when only a single file in directory (c982622) @tomasklaen
- Correctly update proximities on mouse enter and record position (#772) (26d71a8) @christoph-heinrich
- Only autohide UI when the cursor autohides (#771) (c3e5bb2) @christoph-heinrich
- Menu config with mpv.net (#776) (ed42152) @christoph-heinrich
- Controls couldn't cycle some mpv properties (0531659) @tomasklaen
- Don't cause a fling in update_dimensions() (#778) (8df5ea6) @christoph-heinrich
- Scroll parent menus when opening menu by id (#780) (38e68e1) @christoph-heinrich
Documentation
- Add faq (c18b374) @tomasklaen
- Clarify how to control autohide timing (650118e) @tomasklaen
Miscellaneous
- Restructured repo to eliminate
dist
directory (c173641) @tomasklaen
Performance
- Speed up ziggy initialization by using less aggressive binary compression (a8f040a) @tomasklaen
Refactor
- No dynamic localization calls (36f8074) @tomasklaen
- More no dynamic localization calls (7c5d4f1) @tomasklaen
- No dynamic localization calls (6dc4c30) @tomasklaen
- Remove check before adding 0.5 to cursor position (#770) (a7ee37c) @christoph-heinrich
Build
- Added building, packaging, and localization tools (#744) (656ddcf) @tomasklaen
- Fixed unix build script syntax (#758) (16e8ca3) @christoph-heinrich
- Fix ziggy build on unix (88e15ca) @tomasklaen
- Fixed packaging tool reporting total instead of compressed size (8d2dfc4) @tomasklaen
Tweak
- Menu separators restyled a bit (96685b5) @tomasklaen
- Bumped default
border_radius
from2
to4
(18e81c2) @tomasklaen - Tweaked subtitle downloader messages (b862387) @tomasklaen
- Update scroll position when moving items like when navigating (#763) (448d408) @christoph-heinrich
- Bumped timeline cursor line opacity (d804477) @tomasklaen
- Always scroll to selected index on menu open (#779) (a9c83bb) @christoph-heinrich
- Chapter indicator sizing (6d329f9) @tomasklaen
Full Changelog: 5.0.0...5.1.0
5.0.0
Updating
5.0 comes with some breaking changes.
Installation
Our directory structure has changed. If you're updating manually, you should delete uosc_shared
and uosc.lua
in your scripts
folder before installing 5.0, which is only a single uosc
folder now.
Alternatively, you can use one of the new install commands in readme, and it'll take care of that for you.
Config
A lot of config options have been added, changed, or removed and replaced with new ones that are more compact and provide more customization (color
, opacity
, ...).
I recommend just downloading the new uosc.conf
file and reconfiguring it again.
Highlights
Searchable menus
All menus in uosc are now searchable. Just start typing!
Though this disables the ability to toggle the menu with the same key, if the key is just a single letter. You can disable menu_type_to_search
option, and use ctrl+f
or /
to search instead.
For script developers: menu API now includes search related options, as well as on_search
callbacks for you to implement searching on your end.
Keybinds palette
A new command uosc/keybinds
now displays a command palette of all active key bindings. You can search through it to find commands/shortcuts, and what shortcut/commands they're bound to, and of course call it.
Self updating
A new command uosc/update
, which will make uosc re-install itself to update.
It's a bit tricky to make this work, and as a result doesn't work in all environments. See update
command documentation for details.
Menu titles & separators
When defining your own menus in input.conf
, there's now a new syntax for adding un-selectable titles and separators:
# #! Section > Title
# #! Section > ---
Localization
Localization has been added for: de
, es
, fr
, ro
, ru
, zh-hans
. Though not all are up to date.
To control which language you want to see we detect mpv's slang
config, but you can configure it with a more fine grained priority list with uosc's languages
option. See more in default uosc.conf
file.
Other noteworthy changes
Added idle and audio indicators (graphics/text in the middle of screen). All can be disabled with the new disable_elements
option.
Resetting by clicking on speed has been moved from primary to secondary click. This is to match the same behavior now also available on volume.
You can now control stuff like animation length (including disabling animations) and border radius with animation_duration
and border_radius
options.
Fixed touch input event handling.
API
If you're using uosc's API for creating menus for your scripts, there have been some changes. Your stuff still works, just a bit differently, and might need adjustments. Mainly:
- You no longer need to send
get-version
to detect uosc. This message is gone. uosc now instead sends a globaluosc-version <version>
message as the first thing while initializing, which you're probably already listening for. In practice, all you should need to do is just removeget-version
call from your script. - Implicit behavior of
menu-open
andmenu-update
was removed (menu-open
would toggle,menu-update
would open if not already), and there's nowmenu-close
command. To know when you should call close or update, you can checkmp.get_property_native('user-data/uosc/menu/type')
to see if any menu and of what type is currently open, with a fallback ofuosc-menu-type
property onmp.get_property_native('shared-script-properties')
for older mpv versions.
Changelog
Features
- Internationalization (#518) @natural-harmonia-gropius
- French translation (#521) @po5
- Spanish translation (#523) @po5
- Dynamic localization strings and caching @tomasklaen
add-intl-directory
APi for scripts to extend localization @tomasklaen- Romanian translation (#531) @po5
- German translation (#532) @christoph-heinrich
- Scroll to new position after moving item in menu (#552) @christoph-heinrich
- Menu items now accept
selectable
andalign
options @tomasklaen - Improved menu cursor navigation @tomasklaen
- Shuffle now prevents repeating same files often @tomasklaen
- Dropped compatibility for mpv 0.32 and below @tomasklaen
- Add russian translation (#597) @shvchk
- Fast seek in timeline based on cursor velocity @tomasklaen
- Open chapters menu when clicking on current chapter in title @tomasklaen
- Added background to tooltips (#621) @christoph-heinrich
- Initial support for updating options at runtime (#571) @christoph-heinrich
- Searchable menus (#625) @christoph-heinrich
- Search by first character of each word (#644) @christoph-heinrich
- Added
top_bar_flash_on
option @tomasklaen - Added
show_hidden_files
option @tomasklaen - Redesigned menu title & search input (#650) @tomasklaen
- Palette menus (#652) @tomasklaen
- [breaking] Menu script-message changes (#653) @christoph-heinrich
- Added
search_submenus
prop to menus (#655) @tomasklaen - Update german translation (#659) @christoph-heinrich
- Reworked timeline progress mode (#661) @tomasklaen
windowed
andfullscreen
added to available element persistency states @tomasklaeninputs
command to display a palette menu with all active keybindings (#665) @tomasklaen- [breaking] Reworked config options for fullscreen scale adjustments (#664) @tomasklaen
- Added
border_radius
option @tomasklaen - Improved menu title & hint clipping logic (#668) @christoph-heinrich
- [breaking] Reworked opacity options (#680) @tomasklaen
- Added
animation_factor
option to control animation speed @tomasklaen - Navigating menu with up/down/home/end keys is now instant with no animation @tomasklaen
- Added audio indicator for audio files without cover @tomasklaen
- Support for creating menu titles and separators in
input.conf
(#681) @tomasklaen - Changed
animation_factor
option toanimation_duration
@tomasklaen - Scripts to install or update uosc with a single command (#691) @tomasklaen
- Added
disable_elements
option anddisable-elements
script message (#695) @tomasklaen - Added idle indicator, and an ability to control indicator opacities @tomasklaen
- [breaking] Changed modifier to force open directory in file menus from
ctrl
toalt
@tomasklaen - Dynamic volume icon (#699) @dyphire
- [breaking] Reworked color options @tomasklaen
- Right click on volume or speed to reset them @tomasklaen
- Configurable background opacity for buffering indicator (#703) @christoph-heinrich
- Added
update
command to update uosc (#700) @tomasklaen - Removed
get-version
in favor of earlyuosc-version
broadcast (#714) @christoph-heinrich - Renamed
inputs
command tokeybinds
@tomasklaen - Improved
escape
andbackspace
behavior in menus (#719) @tomasklaen
Fixes
- Failing to detect macos platform (#513) @christoph-heinrich
- Language priority (#525) @natural-harmonia-gropius
en
locale not working (#526) @natural-harmonia-gropius- Translate audio channels and devices list (#520) @po5
- Take parameter values into account when caching translations @po5
- Use string type for all translation formatting @po5
- Update simplified chinese translation (#534) @natural-harmonia-gropius
- Translate topbar when no file (#533) @natural-harmonia-gropius
- Update spanish, french, romanian translations (#537) @po5
- Remove redundant menu title translation @tomasklaen
- Translate built-in menu titles (#539) @po5
- Translate fallback chapter title (#540) @po5
- Show empty placeholder for empty menus (#546) @natural-harmonia-gropius
- Take window_border_size into account for thumbnail positioning (#553) @po5
- Take window_border_size into account for tooltip positioning (#554) @po5
- Don't translate strings from
input.conf
@tomasklaen - Removed
add-intl-directory
API @tomasklaen - Window title click events preventing window dragging @tomasklaen
- Crash when opening a non blurred menu (#565) @christoph-heinrich
- Removed debugging leftovers @tomasklaen
- Menu back navigation resetting selected index @tomasklaen
- Crashes when dealing with invalid UTF-8 strings (#579) @christoph-heinrich
- Use
mp.get_script_directory()
instead of relative paths @tomasklaen - Crash when a script menu update renders selected index unavailable (#591) @po5
- Make the install procedure on linux use
XDG_CONFIG_HOME
(#595) @evantj - Error in matching pattern caused some files to be recognized as magnet links @tomasklaen
- Remove redundant symbol order from sorting algorithm (#608) @christoph-heinrich
- Stale (closed) menus triggering input events (#612) @tomasklaen
- Vertically misaligned number in playlist indicator @tomasklaen
- Crash when selecting "Empty" in chapters menu (#626) @christoph-heinrich
- Top bar enabled checks (#628) @christoph-heinrich
- Don't select not selectable items (#627) @christoph-heinrich
- Menu height and positioning (#629) @christoph-heinrich
- Crash when using wrong syntax for speed scale (#633) @christoph-heinrich
prev
commands now play previously played file even when shuffle is enabled @tomasklaen- Selected_index norm in reset_navigation() (#634) @christoph-heinrich
- Shuffle history couldn't go back more than once (#635) @tomasklaen
- Case insensitive menu search (#638) @Christoph-...
4.7.0
Features
- Smarter window main & alt titles deduplication @tomasklaen
- Added menu keybinds to move and delete items in playlists @tomasklaen
- Clicking on playlist indicator in top bar now opens playlist menu @tomasklaen
- Apply margin to
osd-margin-*
(#499) @christoph-heinrichThis should push other osd things like console out of persistent uosc elements.
Fixes
- Lax chapter range patterns producing false positives (#454) @christoph-heinrich
- Use the new console margins API @christoph-heinrich
- Add
ac3
to audio types (#468) @xfzv - Elements staying visible after switching to fullscreen @tomasklaen
- Hide thumbnail when dragging timeline @tomasklaen
image
disposition returning false positives @tomasklaen- Submenus vertically misaligned when opened via
show-submenu
message @tomasklaen - Premature thumbnail hiding during drag seeking @tomasklaen
- Only enable/disable mouse keybinds when they change (#492) @christoph-heinrich
This was causing event binding spam in verbose logging.
autohide
un-registering cursor events when menu is open @tomasklaen- Cursor events not refreshing
autohide
timer @tomasklaen - More timeline seeking, dragging, and
autohide
related tweaks and fixes @tomasklaen - Unloading a file to idle was causing stale current directory path @tomasklaen
- Uncalled for autohide timer triggering on init @tomasklaen
Tweaks
- Add padding to title (#484) @christoph-heinrich
- Treat italic as a width offset rather then a factor (#506) @christoph-heinrich
Full Changelog: 4.6.0...4.7.0
4.6.0
Features
- Add
use_trash
option (#394) @dyphire - Added
destination_time
option and deprecatedtotal_time
(#399) @michael - Better alphanumerical sorting (#426) @christoph-heinrich
- Added an API to overwrite uosc key bindings (#430) @tomasklaen
- Added options to display alternative top bar title @tomasklaen
- Flash top bar when new file is loaded @tomasklaen
- Added
show-submenu-blurred
message listener @tomasklaen - Trim unnecessary
00:
from timestamps in durations shorter than an hour @tomasklaen - Split
media_types
option intovideo_types
,audio_types
, andimage_types
@tomasklaen - Added
autoload_types
option @tomasklaen ctrl+enter
in file menus will load selected directory @tomasklaen- Made
ctrl+click
in file menus behave just likectrl+enter
does @tomasklaen - Visually distinct a-b loop indicators @tomasklaen
- Add
on_close
command to menu API (#449) @christoph-heinrich
Fixes
- A-B loop crash (#389) @christoph-heinrich
- Proximity visibility not being reset when toggling elements off @tomasklaen
- Declare variable before function using it (#396) @christoph-heinrich
- Add
dts
tomedia_types
(#398) @xfzv - Touch input (#412) @christoph-heinrich
mouse-pos
can be nil (#418) @christoph-heinrich- Buffered time not accounting for speed @tomasklaen
- Buffered time respects minus in time remaining (#424) @christoph-heinrich
- Top_bar's visibility sometimes stuck when going fullscreen @tomasklaen
- Menus not toggling off after being updated @tomasklaen
- Infinite margin on initialization (#362) @christoph-heinrich
- File menu back feature broken by b9cc1cc @tomasklaen
- Click to the left of file menus navigating up instead of closing the menu @tomasklaen
- 54bb9d6 prevented loading audio/subtitle tracks from other video files @tomasklaen
- Timestamp offsets should respect the trimmed time width (#443) @christoph-heinrich
Tweak
- Buffered time threshold based on displayed value (#423) @christoph-heinrich
Full Changelog: 4.5.0...4.6.0
4.5.0
Features
- back in file menus now navigates up the directory tree @tomasklaen
- Allow clicking timeline chapter indicators @tomasklaen
Fixes
- Menu prev/next navigation shouldn't smooth scroll @tomasklaen
text_width()
ignoring globalfont_bold
option @tomasklaen- File menu not updating active item and other menu issues @tomasklaen
open-config-directory
not opening correct folder on windows @tomasklaen- Controls activating when overlapping chapter is clicked (#373) @christoph-heinrich
- Osd resolution initializing incorrectly (#383) @christoph-heinrich
- Always enabled cache triggering uncached ranges (#385) @christoph-heinrich
Full Changelog: 4.4.0...4.5.0
4.4.0
Features
- Implement
set-min-visibility
message listener @tomasklaen - Drag to scroll for menu (#331) @christoph-heinrich
- Smooth menu scrolling @tomasklaen
- Improved text width measuring (#322) @christoph-heinrich
- Better file sorting (#338) @christoph-heinrich
- Add
timeline_cache
option to disable cache indicators @tomasklaen - Implement special
spinner
icon for menus @tomasklaen
Fixes
- Properly update title (#318) @christoph-heinrich
- Don't render empty title (#319) @christoph-heinrich
- Buffered time x bounds calculation (#323) @christoph-heinrich
- Menu title/hint clipping (#321) @christoph-heinrich
- Use
ass_safe_title
(#328) @christoph-heinrich - Spacing and clipping in menu (#325) @christoph-heinrich
- Touch input (#327) @christoph-heinrich
- Pause while dragging the timeline (#335) @Hikari
- Urls without slashes not recognized as urls (#336) @Hill-98
- Tone down buffering indicator @tomasklaen
- Update
Controls
onTimeline.enabled
changes @tomasklaen - Windows check for sorting (#345) @christoph-heinrich
- Restore leading zero sorting (#342) @christoph-heinrich
- Selection on mbtn_up requires mbtn_down first (#348) @christoph-heinrich
- Menu title when browsing files (#349) @christoph-heinrich
Performance
- Faster filename sorting (#341) @christoph-heinrich
- Optimize serialize_path (#346) @christoph-heinrich
- Optimize normalize_path (#347) @christoph-heinrich
- Optimize reading directories @tomasklaen
Refactor
- Modularize the codebase @tomasklaen
- Change directory structure to support mpv 0.32 and lower @tomasklaen
Full Changelog: 4.3.0...4.4.0
4.3.0
Features
- Implement
flash-ui
binding andflash-elements
message @tomasklaen - Add buffering indicator (#292) @christoph-heinrich
- Better buffering detection (#298) @christoph-heinrich
- Implement
click_threshold
andclick_command
options @tomasklaenThis deprecates
pause_on_click_shorter_than
option! - Update default menu items @tomasklaen
- Automatically choose between fast and exact seeking (#302) @christoph-heinrich
- Add
external
hint for tracklist menu (#289) @dyphire - Make
toggle
andcycle
controls work with external properties @tomasklaen - Move
@
in control badge props from prefix to suffix for consistency @tomasklaen
Fixes
osd-align-*
properties messing up the UI (#286) @hooke007- Some things not using correct colors @tomasklaen
- Remove opinionated opacity tweaks @tomasklaen
- Broken texture tiling when
font_bold
was enabled @tomasklaen - Thumbnail not clearing when dragging timeline out of window @tomasklaen
- Icons affected by
font_bold=yes
@tomasklaen - Shuffle not really random @tomasklaen
- Use mouse-pos property instead of keybinds (#301) @christoph-heinrich
- Drag seeking crashing the UI during file loads @tomasklaen
- Thumbnail not clearing when timeline dragging released outside of timeline @tomasklaen
- Current chapter not updating on chapter list changes @tomasklaen
- CycleButton internal prop state not initiating properly @tomasklaen
- Title not escaping ass tags in filenames @tomasklaen
- Title initializing prematurely and not accounting for dynamic variables @tomasklaen
- Menu parser not ignoring other comments (#315) @Hikari
Tweaks
- Thumbnail border style @tomasklaen
- Scale BufferingIndicator with window @tomasklaen
click_threshold
descrition and top bar subtitle offset @tomasklaen
Documentation
- Adjust outdated navigation looping instructions @tomasklaen
- Clarify
shuffle
control and option descriptions @tomasklaen
Full Changelog: 4.2.0...4.3.0
4.2.0
Features
- Add
editions
menu,editions
control andhas_many_editon
disposition (#277) @dyphire - Include
closing
in ending chapter range patterns @tomasklaen - Implement external properties API @tomasklaen
- [breaking] Implement
toggle-elements <elements>
message @tomasklaen
This replacedtoggle-{element}
script bindings.
Fixes
osd-*
properties messing up the UI @tomasklaen- Incorrect active index in audio-device menu (#276) @dyphire
- Decouple speed and timeline visibility @tomasklaen
- Elements colliding on small window dimensions @tomasklaen
- Controls config default not matching script default (#283) @hooke007
- Disable menu item pre-selection for mouse navigation @tomasklaen
Performance
Full Changelog: 4.1.0...4.2.0
4.1.0
Features
- Support single chapter ads (#262) @christoph-heinrich
- Add
idle
disposition (#271) @dyphire - Make
*_persistency
supportidle
(#274) @hooke007 - Show vids icon if the current file contains multi vid-tracks (#273) @hooke007
Fixes
- Ads end could be recognized as single chapter ad (#263) @christoph-heinrich
- Draw chapter indicators of chapter ranges (#264) @christoph-heinrich
- A couple config defaults not matching script defaults (#265) @hooke007
- Progress line range adjustments producing inaccurate timeline @tomasklaen
- Show default menu when input.conf doesn't exist (#269) @christoph-heinrich
- Render when thumbnail size changes (#267) @christoph-heinrich
- Speed not inheriting timeline visibility @tomasklaen
- Seeking on paused video would trigger autoload @tomasklaen
- New progress indicator line behavior (#270) @christoph-heinrich
Full Changelog: 4.0.1...4.1.0
4.0.1
Fixes
- Confusing collisions between progress line and timeline ranges @tomasklaen
Full Changelog: 4.0.0...4.0.1