Release Group parsing is wrong when release titles contain hyphenated words in the episode name

Sonarr version (exact version): 4.0.16.2944 - Nov 5 2025
OS: Docker running on Ubuntu Server HWE 6.14.0-37-generic
Debug logs: N/A
Description of issue:

When release titles contain hyphenated words in the episode name, it seems that Sonarr mistakenly treats the “Release Group” by looking at the word after the final hyphen.

For example: For a file named

Some TV (1979) - S02E10 - Hart-Shaped Murder [WEBDL-2160p][EAC3 5.1][x264].mkv

Sonarr is treating the word after the final hypen, i.e. “Shaped”, as the Release Group.

However, the word “Hart-Shaped” is just a hyphenated title, NOT a group. There is no release group here, and Sonarr should not infer one.

My recommendation is perhaps to use a regex such as the following:

-([A-Za-z0-9._-]+)(?=(?:\s*[|.[^.]+$))

This will therefore ensure that a trailing -token is a release group only if:

  1. The token contains no spaces
  2. Nothing with spaces appears after it
  3. It is followed immediately by either metadata ([) or the file extension

I hope this helps.

With filename nothing is parsed as the release group, perhaps it was incorrectly parsed before and still has that stored.

Thanks @markus101

A little boo boo from me, but the issue still does exist, depending on the format of the file.

When I click on the “Preview Rename” option, the file is renamed as such:

For [WEBDL-2160p][EAC3 5.1][x264], it works correctly, and as you mention does not add in a Release. All good here.

Some TV (1979) - S02E10 - Hart-Shaped Murder [WEBDL-2160p][EAC3 5.1][x264].mkv

However, for [SDTV][AAC 2.0][x264], it does NOT work

Some TV (1979) - S02E10 - Hart-Shaped Murder [SDTV][AAC 2.0][x264]-Shaped.mkv

Notice the -Shaped at the end.

My format for standard releases is this, if that is helpful.

{Series TitleYear} - S{season:00}E{episode:00} - {Episode CleanTitle} {[Custom Formats]}{[Quality Full]}{[Mediainfo AudioCodec}{ Mediainfo AudioChannels]}{[MediaInfo VideoDynamicRangeType]}{[Mediainfo VideoCodec]}{-Release Group}

Thanks

Yeah, that does make a difference. I’ll get it fixed, though it’s more complicated than the suggested regex.

@markus101 thanks. If there’s anything I can assist with, please let me know.