Skip to content

Bulk Cleaning

Kain edited this page Jan 20, 2024 · 3 revisions

subclean

NPM NPM Documentation Maintenance License: MIT

Bulk Cleaning

Subclean 1.3.0+ supports the --sweep parameter to clean a whole directory (and many, many sub-directories inside it)

If you want this to run automatically with Bazarr then head on over to this page.

This will recursively look through sub-directories for subtitle files and add them to a queue. Once the file collection is complete, each subtitle file will be cleaned one by one. The cleaned file will overwrite the existing file.

subclean --sweep "path/to/media"

You can also pass --depth n to limit how deep subclean will look when finding subtitles.
For example --depth 1 means subclean will only grab files from the first directory. By default the depth is set to 10. There is a hard limit of 1-25. I recommend leaving this untouched.

Depth Map

TV Series (depth 1)
|
├─Breaking Bad (depth 2)
│  │  poster.png
|  |  season01-poster.png
|  |  season02-poster.png
│  │
│  ├─Season 1 (depth 3)
│  │  │  Episode 1.srt
│  │  │  Episode 2.srt
│  │  │
│  │  └─Even Deeper (depth 4)
│  │      │  subtitle.srt
│  │
│  ├─Season 2 (depth 3)
│  │  │  Episode 1.srt
│  │  │  Episode 2.srt
Clone this wiki locally