Over the last few years I’ve worked on a project to automatically clean up my SRT subtitle files.
It allows you to create your own rules that apply to each subtitle line. For example, I’ve added a rule to remove font changes, bold and italics or another rule to remove unnecessary spacing at the beginning or end of a line. There’s quite a few formatting rules provided in the example settings file.
There’s also a few different post-processing scripts included to make it work with various tools you may already use (Sonarr included).
Check it out: https://github.com/mdcollins05/srt-auto-edit