Weird behavior in subtitle rename

Sonarr version (exact version): 2.0.0.4689
OS: Windows 10 x64 Enterprise
Description of issue:

All of my TV show files have corresponding external SRT subtitle files on the same series folders directory. Naturally, they are named exactly the same as the mp4 files. I needed to change the episode naming format

from: Series Title (2010) - S01E01 - Episode Title (1) - HDTV-720p Proper -RlsGrp
to: Series Title (2010) - S01E01 - Episode Title (1) [HDTV-720p Proper -RlsGrp]

I then used Series Editor to organize all the files so that the new naming convention would take effect. I wasn’t expecting the subtitles to follow suit but I was amazed that they did (less work for me, yay!). But then when I played a release, no subtitles were playing. When I looked closely, the subtitles were renamed this way:

Series Title (2010) - S01E01 - Episode Title (1) [HDTV-720p Proper -RlsGrp]…srt

You see those double dots there? There’s a trailing dot before the actual .ext in the end. Why is this so?

It’s a bug, which I believe is fixed in develop, but not in the master release yet.

The square brackets at the end can cause issues with parsing if Sonarr ever needs to re-parse the files (rebuilding the database), if the series or episode title contains a 2 or 3 digit number they’ll get parsed with the anime parser incorrectly.

I see. Is there any workaround to this for now?

Upgrading to a develop release is the only way to get the fix right now.

Ok, had a way to fix the SRT filenames with Powershell. Here’s the command:

dir *…srt -Recurse | Rename-Item -NewName {$_.Name -replace “…srt”,".srt"}

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.