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