New Scanner + People Pages (#3286)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
1ed0eae22d
commit
ba20ad4ecc
142 changed files with 17529 additions and 3038 deletions
|
@ -714,8 +714,9 @@ public static class Parser
|
|||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <returns></returns>
|
||||
public static bool HasSpecialMarker(string filePath)
|
||||
public static bool HasSpecialMarker(string? filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath)) return false;
|
||||
return SpecialMarkerRegex.IsMatch(filePath);
|
||||
}
|
||||
|
||||
|
@ -728,30 +729,19 @@ public static class Parser
|
|||
|
||||
public static bool IsSpecial(string? filePath, LibraryType type)
|
||||
{
|
||||
return type switch
|
||||
{
|
||||
LibraryType.Manga => IsMangaSpecial(filePath),
|
||||
LibraryType.Comic => IsComicSpecial(filePath),
|
||||
LibraryType.Book => IsMangaSpecial(filePath),
|
||||
LibraryType.Image => IsMangaSpecial(filePath),
|
||||
LibraryType.LightNovel => IsMangaSpecial(filePath),
|
||||
LibraryType.ComicVine => IsComicSpecial(filePath),
|
||||
_ => false
|
||||
};
|
||||
return HasSpecialMarker(filePath);
|
||||
}
|
||||
|
||||
private static bool IsMangaSpecial(string? filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath)) return false;
|
||||
filePath = ReplaceUnderscores(filePath);
|
||||
return MangaSpecialRegex.IsMatch(filePath);
|
||||
return HasSpecialMarker(filePath);
|
||||
}
|
||||
|
||||
private static bool IsComicSpecial(string? filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath)) return false;
|
||||
filePath = ReplaceUnderscores(filePath);
|
||||
return ComicSpecialRegex.IsMatch(filePath);
|
||||
return HasSpecialMarker(filePath);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue