Round 3 of Bugfixing (#3318)
This commit is contained in:
parent
727fbd353b
commit
abdf15b895
40 changed files with 482 additions and 489 deletions
|
|
@ -171,7 +171,7 @@ public class CacheService : ICacheService
|
|||
var chapter = await _unitOfWork.ChapterRepository.GetChapterAsync(chapterId);
|
||||
var extractPath = GetCachePath(chapterId);
|
||||
|
||||
SemaphoreSlim extractLock = ExtractLocks.GetOrAdd(chapterId, id => new SemaphoreSlim(1,1));
|
||||
var extractLock = ExtractLocks.GetOrAdd(chapterId, id => new SemaphoreSlim(1,1));
|
||||
|
||||
await extractLock.WaitAsync();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -609,10 +609,6 @@ public class ReadingListService : IReadingListService
|
|||
|
||||
private static List<string> GetUniqueSeries(CblReadingList cblReading, bool useComicLibraryMatching)
|
||||
{
|
||||
if (useComicLibraryMatching)
|
||||
{
|
||||
return cblReading.Books.Book.Select(b => Parser.Normalize(GetSeriesFormatting(b, useComicLibraryMatching))).Distinct().ToList();
|
||||
}
|
||||
return cblReading.Books.Book.Select(b => Parser.Normalize(GetSeriesFormatting(b, useComicLibraryMatching))).Distinct().ToList();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ public class TachiyomiService : ITachiyomiService
|
|||
{
|
||||
private readonly IUnitOfWork _unitOfWork;
|
||||
private readonly IMapper _mapper;
|
||||
private readonly ILogger<ReaderService> _logger;
|
||||
private readonly ILogger<TachiyomiService> _logger;
|
||||
private readonly IReaderService _readerService;
|
||||
|
||||
private static readonly CultureInfo EnglishCulture = CultureInfo.CreateSpecificCulture("en-US");
|
||||
|
||||
public TachiyomiService(IUnitOfWork unitOfWork, IMapper mapper, ILogger<ReaderService> logger, IReaderService readerService)
|
||||
public TachiyomiService(IUnitOfWork unitOfWork, IMapper mapper, ILogger<TachiyomiService> logger, IReaderService readerService)
|
||||
{
|
||||
_unitOfWork = unitOfWork;
|
||||
_readerService = readerService;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class ComicVineParser(IDirectoryService directoryService) : DefaultParser
|
|||
// When there was at least one directory and we failed to parse the series, this is the final fallback
|
||||
if (string.IsNullOrEmpty(info.Series))
|
||||
{
|
||||
info.Series = Parser.CleanTitle(directories[0], true, true);
|
||||
info.Series = Parser.CleanTitle(directories[0], true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -85,7 +85,7 @@ public class ComicVineParser(IDirectoryService directoryService) : DefaultParser
|
|||
|
||||
if (string.IsNullOrEmpty(info.Series))
|
||||
{
|
||||
info.Series = Parser.CleanTitle(directoryName, true, false);
|
||||
info.Series = Parser.CleanTitle(directoryName, true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class ImageParser(IDirectoryService directoryService) : DefaultParser(dir
|
|||
// Override the series name, as fallback folders needs it to try and parse folder name
|
||||
if (string.IsNullOrEmpty(ret.Series) || ret.Series.Equals(directoryName))
|
||||
{
|
||||
ret.Series = Parser.CleanTitle(directoryName, replaceSpecials: false);
|
||||
ret.Series = Parser.CleanTitle(directoryName);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -959,25 +959,25 @@ public static class Parser
|
|||
/// <param name="isComic"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public static string CleanTitle(string title, bool isComic = false, bool replaceSpecials = true)
|
||||
public static string CleanTitle(string title, bool isComic = false)
|
||||
{
|
||||
|
||||
title = ReplaceUnderscores(title);
|
||||
|
||||
title = RemoveEditionTagHolders(title);
|
||||
|
||||
if (replaceSpecials)
|
||||
{
|
||||
if (isComic)
|
||||
{
|
||||
title = RemoveComicSpecialTags(title);
|
||||
title = RemoveEuropeanTags(title);
|
||||
}
|
||||
else
|
||||
{
|
||||
title = RemoveMangaSpecialTags(title);
|
||||
}
|
||||
}
|
||||
// if (replaceSpecials)
|
||||
// {
|
||||
// if (isComic)
|
||||
// {
|
||||
// title = RemoveComicSpecialTags(title);
|
||||
// title = RemoveEuropeanTags(title);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// title = RemoveMangaSpecialTags(title);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
title = title.Trim(SpacesAndSeparators);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue