mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Forgot to update DTO to send it to the Frontend.
This commit is contained in:
parent
28ce2bbba1
commit
83076f02ad
@ -7,5 +7,6 @@ namespace API.DTOs
|
||||
public int Number { get; set; }
|
||||
public string Name { get; set; }
|
||||
public byte[] CoverImage { get; set; }
|
||||
public int Pages { get; set; }
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ namespace API.Interfaces
|
||||
/// Clears cache directory of all volumes that belong to a given library.
|
||||
/// </summary>
|
||||
/// <param name="libraryId"></param>
|
||||
/// <param name="volumeIds">Volumes that belong to that library. Assume the library might have been deleted before this invocation.</param>
|
||||
void CleanupLibrary(int libraryId, int[] volumeIds);
|
||||
|
||||
|
||||
|
@ -26,8 +26,18 @@ namespace API.Services
|
||||
_numericComparer = new NumericComparer();
|
||||
}
|
||||
|
||||
private bool CacheDirectoryIsAccessible()
|
||||
{
|
||||
var di = new DirectoryInfo(_cacheDirectory);
|
||||
return di.Exists;
|
||||
}
|
||||
|
||||
public async Task<Volume> Ensure(int volumeId)
|
||||
{
|
||||
if (!CacheDirectoryIsAccessible())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
Volume volume = await _seriesRepository.GetVolumeAsync(volumeId);
|
||||
foreach (var file in volume.Files)
|
||||
{
|
||||
@ -44,6 +54,12 @@ namespace API.Services
|
||||
{
|
||||
_logger.LogInformation("Performing cleanup of Cache directory");
|
||||
|
||||
if (!CacheDirectoryIsAccessible())
|
||||
{
|
||||
_logger.LogError($"Cache directory {_cacheDirectory} is not accessible or does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
DirectoryInfo di = new DirectoryInfo(_cacheDirectory);
|
||||
|
||||
try
|
||||
|
Loading…
x
Reference in New Issue
Block a user