Polish Round 4 (#2429)

This commit is contained in:
Joe Milazzo 2023-11-12 08:29:46 -06:00 committed by GitHub
parent cd7f876140
commit ee72727841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 666 additions and 599 deletions

View file

@ -843,23 +843,27 @@ public static class Parser
/// <param name="isComic"></param>
/// <returns></returns>
public static string CleanTitle(string title, bool isComic = false)
public static string CleanTitle(string title, bool isComic = false, bool replaceSpecials = true)
{
title = ReplaceUnderscores(title);
title = RemoveEditionTagHolders(title);
if (isComic)
if (replaceSpecials)
{
title = RemoveComicSpecialTags(title);
title = RemoveEuropeanTags(title);
}
else
{
title = RemoveMangaSpecialTags(title);
if (isComic)
{
title = RemoveComicSpecialTags(title);
title = RemoveEuropeanTags(title);
}
else
{
title = RemoveMangaSpecialTags(title);
}
}
title = title.Trim(SpacesAndSeparators);
title = EmptySpaceRegex.Replace(title, " ");