diff --git a/UmlautAdaptarr/Models/SearchItem.cs b/UmlautAdaptarr/Models/SearchItem.cs index 29fdabf..4e3239b 100644 --- a/UmlautAdaptarr/Models/SearchItem.cs +++ b/UmlautAdaptarr/Models/SearchItem.cs @@ -108,6 +108,20 @@ namespace UmlautAdaptarr.Models } + // if a german title ends with "Germany" (e.g. Good Luck Guys Germany) also add a search string that replaces Germany with GERMAN + // (e.g. Good Luck Guys GERMAN). This is because reality shows often have different formats in different countries with the same + // name. // also add a matching title without GERMAN + if (germanTitle?.EndsWith("germany", StringComparison.OrdinalIgnoreCase) ?? false) + { + TitleSearchVariations = [.. TitleSearchVariations, + .. + GenerateVariations( + (germanTitle[..^7] + "GERMAN").RemoveExtraWhitespaces(), + mediaType)]; + + allTitleVariations.AddRange(GenerateVariations(germanTitle[..^8].Trim(), mediaType)); + } + // If title contains ":" also match for "-" if (germanTitle?.Contains(':') ?? false) {