Code cleanup. Implemented ability to schedule Library Backups.
This commit is contained in:
parent
83b9394b17
commit
b4ee16d8d1
35 changed files with 217 additions and 91 deletions
|
@ -18,10 +18,12 @@ namespace API.Interfaces
|
|||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<SeriesDto>> GetSeriesDtoForLibraryIdAsync(int libraryId, int userId);
|
||||
|
||||
/// <summary>
|
||||
/// Does not add user information like progress, ratings, etc.
|
||||
/// </summary>
|
||||
/// <param name="libraryIds"></param>
|
||||
/// <param name="searchQuery">Series name to search for</param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<SearchResultDto>> SearchSeries(int[] libraryIds, string searchQuery);
|
||||
Task<IEnumerable<Series>> GetSeriesForLibraryIdAsync(int libraryId);
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
{
|
||||
public interface ITaskScheduler
|
||||
{
|
||||
/// <summary>
|
||||
/// For use on Server startup
|
||||
/// </summary>
|
||||
void ScheduleTasks();
|
||||
void ScanLibrary(int libraryId, bool forceUpdate = false);
|
||||
void CleanupChapters(int[] chapterIds);
|
||||
void RefreshMetadata(int libraryId, bool forceUpdate = true);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.IO.Compression;
|
||||
|
||||
namespace API.Interfaces
|
||||
namespace API.Interfaces.Services
|
||||
{
|
||||
public interface IArchiveService
|
||||
{
|
7
API/Interfaces/Services/IBackupService.cs
Normal file
7
API/Interfaces/Services/IBackupService.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace API.Interfaces.Services
|
||||
{
|
||||
public interface IBackupService
|
||||
{
|
||||
void BackupDatabase();
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
using System.Threading.Tasks;
|
||||
using API.Entities;
|
||||
|
||||
namespace API.Interfaces
|
||||
namespace API.Interfaces.Services
|
||||
{
|
||||
public interface ICacheService
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
using System.Threading.Tasks;
|
||||
using API.DTOs;
|
||||
|
||||
namespace API.Interfaces
|
||||
namespace API.Interfaces.Services
|
||||
{
|
||||
public interface IDirectoryService
|
||||
{
|
||||
|
@ -21,5 +21,11 @@ namespace API.Interfaces
|
|||
/// <param name="searchPatternExpression"></param>
|
||||
/// <returns></returns>
|
||||
string[] GetFiles(string path, string searchPatternExpression = "");
|
||||
/// <summary>
|
||||
/// Returns true if the path exists and is a directory. If path does not exist, this will create it. Returns false in all fail cases.
|
||||
/// </summary>
|
||||
/// <param name="directoryPath"></param>
|
||||
/// <returns></returns>
|
||||
bool ExistOrCreate(string directoryPath);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
namespace API.Interfaces
|
||||
namespace API.Interfaces.Services
|
||||
{
|
||||
public interface IScannerService
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System.Threading.Tasks;
|
||||
using API.Entities;
|
||||
|
||||
namespace API.Interfaces
|
||||
namespace API.Interfaces.Services
|
||||
{
|
||||
public interface ITokenService
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue