github tomasklaen/uosc 5.1.0

latest releases: 5.2.0, 5.1.1
7 months ago

Highlights

Subtitle downloader

subdown

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

Fixes

Documentation

Miscellaneous

Performance

  • Speed up ziggy initialization by using less aggressive binary compression (a8f040a) @tomasklaen

Refactor

Build

Tweak

Full Changelog: 5.0.0...5.1.0

Don't miss a new uosc release

NewReleases is sending notifications on new releases.