mirror of
https://github.com/Readarr/Readarr
synced 2026-01-07 08:07:42 +01:00
Fixed: Don't strip apostrophes
This commit is contained in:
parent
31cad994ba
commit
e1862653f9
2 changed files with 2 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ public void should_replace_some_special_characters_artist(string artist, string
|
|||
[TestCase("American III: Solitary Man", "American+III+Solitary+Man")]
|
||||
[TestCase("Sad Clowns & Hillbillies", "Sad+Clowns+Hillbillies")]
|
||||
[TestCase("¿Quién sabe?", "Quien+sabe")]
|
||||
[TestCase("Seal the Deal & Let’s Boogie", "Seal+the+Deal+Lets+Boogie")]
|
||||
[TestCase("Seal the Deal & Let’s Boogie", "Seal+the+Deal+Let’s+Boogie")]
|
||||
[TestCase("Section.80", "Section+80")]
|
||||
public void should_replace_some_special_characters(string album, string expected)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
|||
{
|
||||
public abstract class SearchCriteriaBase
|
||||
{
|
||||
private static readonly Regex SpecialCharacter = new Regex(@"[`'’]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex NonWord = new Regex(@"[\W]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex NonWord = new Regex(@"[^\w`'’]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex BeginningThe = new Regex(@"^the\s", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
public virtual bool MonitoredBooksOnly { get; set; }
|
||||
|
|
@ -36,7 +35,6 @@ public static string GetQueryTitle(string title)
|
|||
|
||||
cleanTitle = cleanTitle.Replace(" & ", " ");
|
||||
cleanTitle = cleanTitle.Replace(".", " ");
|
||||
cleanTitle = SpecialCharacter.Replace(cleanTitle, "");
|
||||
cleanTitle = NonWord.Replace(cleanTitle, "+");
|
||||
|
||||
//remove any repeating +s
|
||||
|
|
|
|||
Loading…
Reference in a new issue