diff --git a/Jellyfin.Plugin.AniDB/Providers/equals_check.cs b/Jellyfin.Plugin.AniDB/Providers/equals_check.cs index 80bfea8..467b8c6 100644 --- a/Jellyfin.Plugin.AniDB/Providers/equals_check.cs +++ b/Jellyfin.Plugin.AniDB/Providers/equals_check.cs @@ -126,9 +126,10 @@ namespace Jellyfin.Plugin.AniDB.Providers string xml = File.ReadAllText(GetAnidbXml()); string s = "-"; int x = 0; + Regex searchRegex = new Regex(@"(?>[^<>]+|<(?!\/anime>)[^<>]*>)*?.*" + FuzzyRegexEscape(ShortenString(name, 6, 20)), RegexOptions.IgnoreCase | RegexOptions.Compiled); while (!string.IsNullOrEmpty(s)) { - s = OneLineRegex(new Regex(@"(?>[^<>]+|<(?!\/anime>)[^<>]*>)*?.*" + FuzzyRegexEscape(ShortenString(name, 6, 20)), RegexOptions.IgnoreCase | RegexOptions.Compiled), xml, 1, x); + s = OneLineRegex(searchRegex, xml, 1, x); if (s != "") { results.Add(s); @@ -163,6 +164,7 @@ namespace Jellyfin.Plugin.AniDB.Providers string xml = File.ReadAllText(GetAnidbXml()); int lowestDistance = Plugin.Instance.Configuration.TitleSimilarityThreshold; string currentId = ""; + foreach (string id in results) { string nameXmlFromId = OneLineRegex(new Regex(@"", RegexOptions.Compiled), xml);