Merge pull request #56 from nalsai/fix-n-apostrophe

Add n` replacement
This commit is contained in:
Odd Stråbø 2024-05-21 00:54:17 +02:00 committed by GitHub
commit 41fee1796d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,6 +88,7 @@ namespace Jellyfin.Plugin.AniDB.Providers
a = a.Replace("wo", "w?o", StringComparison.OrdinalIgnoreCase);
a = a.Replace("c", "(c|k)", StringComparison.OrdinalIgnoreCase);
a = a.Replace("k", "(c|k)", StringComparison.OrdinalIgnoreCase);
a = a.Replace("n", "n`?", StringComparison.OrdinalIgnoreCase);
a = a.Replace("&", "(&|(and))", StringComparison.OrdinalIgnoreCase);
a = a.Replace("and", "(&|(and))", StringComparison.OrdinalIgnoreCase);
@ -166,7 +167,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(@"<anime aid=""" + id + @"""((?s).*?)<\/anime>", RegexOptions.Compiled), xml);