mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
audiobookbay: clean titles (#14025)
This commit is contained in:
@@ -256,7 +256,7 @@ namespace Jackett.Common.Indexers
|
|||||||
Guid = details,
|
Guid = details,
|
||||||
Details = details,
|
Details = details,
|
||||||
Link = details,
|
Link = details,
|
||||||
Title = title,
|
Title = CleanTitle(title),
|
||||||
Category = categories,
|
Category = categories,
|
||||||
Size = size,
|
Size = size,
|
||||||
Seeders = 1,
|
Seeders = 1,
|
||||||
@@ -292,5 +292,13 @@ namespace Jackett.Common.Indexers
|
|||||||
|
|
||||||
return dom;
|
return dom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string CleanTitle(string title)
|
||||||
|
{
|
||||||
|
title = Regex.Replace(title, @"[\u0000-\u0008\u000A-\u001F\u0100-\uFFFF]", string.Empty, RegexOptions.Compiled);
|
||||||
|
title = Regex.Replace(title, @"\s+", " ", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
return title.Trim();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user