Skip to content

Commit

Permalink
Fixed: Overly aggressive exception release group parsing
Browse files Browse the repository at this point in the history
(cherry picked from commit 0183812cc58dad0e555125ddd8b33a85cbdecbf2)
  • Loading branch information
markus101 authored and mynameisbogdan committed Mar 8, 2024
1 parent c974344 commit be8f7e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class ReleaseGroupParserFixture : CoreTest
[TestCase("[TR24][OF] Good Charlotte - Generation Rx - 2018", null)]
[TestCase("The.Good.Series.S05E03.Series.of.Intelligence.1080p.10bit.AMZN.WEB-DL.DDP5.1.HEVC-Vyndros", "Vyndros")]
[TestCase("Artist.Title-Album.Title.1080p.DSNP.WEB-DL.DDP2.0.H.264-VARYG", "VARYG")]
[TestCase("Artist Title - Album Title (Showtime) (1080p.BD.DD5.1.x265-TheSickle[TAoE])", "TheSickle")]

// [TestCase("", "")]
public void should_parse_release_group(string title, string expected)
Expand Down
2 changes: 1 addition & 1 deletion src/NzbDrone.Core/Parser/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static class Parser
private static readonly Regex ExceptionReleaseGroupRegexExact = new Regex(@"(?<releasegroup>(?:D\-Z0N3|Fight-BB|VARYG|E\.N\.D)\b)", RegexOptions.IgnoreCase | RegexOptions.Compiled);

// groups whose releases end with RlsGroup) or RlsGroup]
private static readonly Regex ExceptionReleaseGroupRegex = new Regex(@"(?<releasegroup>(Silence|afm72|Panda|Ghost|MONOLITH|Tigole|Joy|ImE|UTR|t3nzin|Anime Time|Project Angel|Hakata Ramen|HONE|Vyndros|SEV|Garshasp|Kappa|Natty|RCVR|SAMPA|YOGI|r00t|EDGE2020|RZeroX)(?=\]|\)))", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex ExceptionReleaseGroupRegex = new Regex(@"(?<=[._ \[])(?<releasegroup>(Silence|afm72|Panda|Ghost|MONOLITH|Tigole|Joy|ImE|UTR|t3nzin|Anime Time|Project Angel|Hakata Ramen|HONE|Vyndros|SEV|Garshasp|Kappa|Natty|RCVR|SAMPA|YOGI|r00t|EDGE2020|RZeroX)(?=\]|\)))", RegexOptions.IgnoreCase | RegexOptions.Compiled);

private static readonly Regex WordDelimiterRegex = new Regex(@"(\s|\.|,|_|-|=|\|)+", RegexOptions.Compiled);
private static readonly Regex PunctuationRegex = new Regex(@"[^\w\s]", RegexOptions.Compiled);
Expand Down

0 comments on commit be8f7e5

Please sign in to comment.