v0.6.1 Hotfix RC (#1635)
* Swapped out SQLite for Memory, but the one from hangfire. Added DisableConcurrentExecution on ProcessChange to avoid duplication when multiple threads execute at once. * Fixed the Hangfire SQL issues with CPU/ram utilization some users are facing * Fixed a case in SharpCompress fallback where an invalid ComicInfo wasn't picked up. * When parsing epubs, if there is a volume in the epub title, try to parse and group. This is beneficial for Light Novels which are generally tagged this way. * Fixed delete series in series detail not triggering * Fixed some parsing logic for how we treat specials, like Annual and Omnibus. * When scanning files, if the file is the cover image (loose leaf image), we reject it more quickly than previously. * Added a potential bug marker * Fixed a bug where Info was only showing Error level loggers * Code smells
This commit is contained in:
parent
6dd79d8c6a
commit
3f51cb2a02
21 changed files with 96 additions and 15 deletions
|
|
@ -192,6 +192,7 @@ public class LibraryWatcher : ILibraryWatcher
|
|||
/// <remarks>This is public only because Hangfire will invoke it. Do not call external to this class.</remarks>
|
||||
/// <param name="filePath">File or folder that changed</param>
|
||||
/// <param name="isDirectoryChange">If the change is on a directory and not a file</param>
|
||||
[DisableConcurrentExecution(60)]
|
||||
// ReSharper disable once MemberCanBePrivate.Global
|
||||
public async Task ProcessChange(string filePath, bool isDirectoryChange = false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,10 @@ public class SeriesModified
|
|||
public IEnumerable<string> LibraryRoots { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Responsible for taking parsed info from ReadingItemService and DirectoryService and combining them to emit DB work
|
||||
/// on a series by series.
|
||||
/// </summary>
|
||||
public class ParseScannedFiles
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ public class DefaultParser : IDefaultParser
|
|||
public ParserInfo Parse(string filePath, string rootPath, LibraryType type = LibraryType.Manga)
|
||||
{
|
||||
var fileName = _directoryService.FileSystem.Path.GetFileNameWithoutExtension(filePath);
|
||||
// TODO: Potential Bug: This will return null, but on Image libraries, if all images, we would want to include this.
|
||||
if (Parser.IsCoverImage(_directoryService.FileSystem.Path.GetFileName(filePath))) return null;
|
||||
ParserInfo ret;
|
||||
|
||||
if (Parser.IsEpub(filePath))
|
||||
|
|
@ -62,7 +64,6 @@ public class DefaultParser : IDefaultParser
|
|||
};
|
||||
}
|
||||
|
||||
if (Parser.IsCoverImage(_directoryService.FileSystem.Path.GetFileName(filePath))) return null;
|
||||
|
||||
if (Parser.IsImage(filePath))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,11 +200,11 @@ public static class Parser
|
|||
MatchOptions, RegexTimeout),
|
||||
// [dmntsf.net] One Piece - Digital Colored Comics Vol. 20 Ch. 177 - 30 Million vs 81 Million.cbz
|
||||
new Regex(
|
||||
@"(?<Series>.*) (\b|_|-)(vol)\.?(\s|-|_)?\d+",
|
||||
@"(?<Series>.+?):? (\b|_|-)(vol)\.?(\s|-|_)?\d+",
|
||||
MatchOptions, RegexTimeout),
|
||||
// [xPearse] Kyochuu Rettou Volume 1 [English] [Manga] [Volume Scans]
|
||||
new Regex(
|
||||
@"(?<Series>.*) (\b|_|-)(vol)(ume)",
|
||||
@"(?<Series>.+?):? (\b|_|-)(vol)(ume)",
|
||||
MatchOptions,
|
||||
RegexTimeout),
|
||||
//Knights of Sidonia c000 (S2 LE BD Omake - BLAME!) [Habanero Scans]
|
||||
|
|
@ -596,7 +596,7 @@ public static class Parser
|
|||
|
||||
private static readonly Regex ComicSpecialRegex = new Regex(
|
||||
// All Keywords, does not account for checking if contains volume/chapter identification. Parser.Parse() will handle.
|
||||
$@"\b(?:{CommonSpecial}|\d.+?\WAnnual|Annual\W\d.+?|Book \d.+?|Compendium \d.+?|Omnibus \d.+?|FCBD \d.+?|Absolute \d.+?|Preview \d.+?|Hors[ -]S[ée]rie|TPB|HS|THS)\b",
|
||||
$@"\b(?:{CommonSpecial}|\d.+?(\W|-|^)Annual|Annual(\W|-|$)|Book \d.+?|Compendium(\W|-|$|\s.+?)|Omnibus(\W|-|$|\s.+?)|FCBD \d.+?|Absolute(\W|-|$|\s.+?)|Preview(\W|-|$|\s.+?)|Hors[ -]S[ée]rie|TPB|HS|THS)\b",
|
||||
MatchOptions, RegexTimeout
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue