More Polishing (#428)
# Added - Added: Added a new button on admin dashboard to clear cache for the whole server # Changed - Changed: Moved the download logs to the new System page - Changed: Tag Badges now show the correct cursor to help indication actions. For example, Collection badges on series detail page can be clicked, while type cannot. # Fixed - Fixed: Fixed an issue in develop builds where Pagination no longer worked due to Header not being exposed - Fixed: After Scanning a series, clear out any cached chapters ======================================================= * After Scanning a series, clear out any cached chapters. * Implemented cursor overrides for tag badges * Fixed pagination no longer working due to Pagination header not being able to be read from the UI. * Fixed some css things with icons within tagbadges not taking the selection mode styling * Moved download logs button to the system page * Implemented the ability to clear cache for the whole server from admin dashboard * Removed debug code * Up the Regex Timeout for the Github Build System
This commit is contained in:
parent
107b70226c
commit
4f3461710c
21 changed files with 141 additions and 36 deletions
|
@ -301,7 +301,6 @@ namespace API.Services
|
|||
entry.WriteTo(ms);
|
||||
ms.Position = 0;
|
||||
|
||||
|
||||
var serializer = new XmlSerializer(typeof(ComicInfo));
|
||||
var info = (ComicInfo) serializer.Deserialize(ms);
|
||||
return info;
|
||||
|
|
|
@ -379,7 +379,6 @@ namespace API.Services
|
|||
using var stream = StreamManager.GetStream("BookService.GetPdfPage");
|
||||
for (var pageNumber = 0; pageNumber < pages; pageNumber++)
|
||||
{
|
||||
// IDEA! Move stream out and use the same stream
|
||||
GetPdfPage(docReader, pageNumber, stream);
|
||||
File.WriteAllBytes(Path.Combine(targetDirectory, "Page-" + pageNumber + ".png"), stream.ToArray());
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -113,7 +114,7 @@ namespace API.Services
|
|||
_logger.LogInformation("Cache directory purged");
|
||||
}
|
||||
|
||||
public void CleanupChapters(int[] chapterIds)
|
||||
public void CleanupChapters(IEnumerable<int> chapterIds)
|
||||
{
|
||||
_logger.LogInformation("Running Cache cleanup on Volumes");
|
||||
|
||||
|
|
|
@ -26,16 +26,18 @@ namespace API.Services.Tasks
|
|||
private readonly IArchiveService _archiveService;
|
||||
private readonly IMetadataService _metadataService;
|
||||
private readonly IBookService _bookService;
|
||||
private readonly ICacheService _cacheService;
|
||||
private readonly NaturalSortComparer _naturalSort = new ();
|
||||
|
||||
public ScannerService(IUnitOfWork unitOfWork, ILogger<ScannerService> logger, IArchiveService archiveService,
|
||||
IMetadataService metadataService, IBookService bookService)
|
||||
IMetadataService metadataService, IBookService bookService, ICacheService cacheService)
|
||||
{
|
||||
_unitOfWork = unitOfWork;
|
||||
_logger = logger;
|
||||
_archiveService = archiveService;
|
||||
_metadataService = metadataService;
|
||||
_bookService = bookService;
|
||||
_cacheService = cacheService;
|
||||
}
|
||||
|
||||
[DisableConcurrentExecution(timeoutInSeconds: 360)]
|
||||
|
@ -46,6 +48,7 @@ namespace API.Services.Tasks
|
|||
var series = await _unitOfWork.SeriesRepository.GetSeriesByIdAsync(seriesId);
|
||||
var library = await _unitOfWork.LibraryRepository.GetFullLibraryForIdAsync(libraryId, seriesId);
|
||||
var dirs = FindHighestDirectoriesFromFiles(library, files);
|
||||
var chapterIds = await _unitOfWork.SeriesRepository.GetChapterIdsForSeriesAsync(new []{ seriesId });
|
||||
|
||||
_logger.LogInformation("Beginning file scan on {SeriesName}", series.Name);
|
||||
var scanner = new ParseScannedFiles(_bookService, _logger);
|
||||
|
@ -71,6 +74,7 @@ namespace API.Services.Tasks
|
|||
totalFiles, parsedSeries.Keys.Count, sw.ElapsedMilliseconds + scanElapsedTime, series.Name);
|
||||
CleanupUserProgress();
|
||||
BackgroundJob.Enqueue(() => _metadataService.RefreshMetadata(libraryId, forceUpdate));
|
||||
BackgroundJob.Enqueue(() => _cacheService.CleanupChapters(chapterIds));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue