Skip to content
Kain edited this page Jan 20, 2024 · 11 revisions

subclean

NPM NPM Documentation Maintenance License: MIT

This tool was originally made to work with Bazarr's post-processing for automatic cleaning on any subtitles downloaded.
If you don't use bazarr and want to clean your entire library, you can simply use the --sweep command. See the Bulk Cleaning page for more info.

Note

As much as I love Bazarr the team behind the tool strongly oppose removing ads from subtitles. Their reply is always something along the lines of just buy VIP, it's cheap. OpenSubtitles VIP is only $10 a year and removes ads from both the website and any subtitles you download. It's definitely worth the money.
However, OpenSubtitles isn't the only subtitle provider out there and a lot of the time downloaded movies or episodes will include synced subtitles with unwanted ads or credits.
Additionally, cleaning existing subtitles is significantly faster than re-downloading them all after buying VIP.

Binaries

  1. Grab the latest build from the releases page.
  2. Unzip and place the executable somewhere Bazarr can access it.
  3. In Bazarr navigate to Settings → Subtitles → Post Processing
  4. Enter the command: subclean "{{subtitles}}" -w -n and save

Verify

If done correctly you should see something similar to this in the logs whenever a subtitle is downloaded.
If you get the following message: Nothing returned from command execution then Bazarr is unable to access subclean, you will need to:

  • Windows: Make sure you have added the directory to the windows PATH environment variable.
  • Linux: Place the binary in /usr/bin

NodeJS

If you have NodeJS installed, you can simply install, update or uninstall subclean using the following commands without having to mess around with environment variables and such:

  1. npm install -g subclean
  2. npm upgrade -g subclean
  3. npm remove -g subclean

Example

1

Clone this wiki locally