mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-03 05:34:21 -04:00
* Remove automatic retry for scanLibraries as if something fails, it wont pass magically. Catch exceptions when opening books for parsing and swallow to ignore the file. * Delete extra attempts * Switched to using FirstOrDefault for finding existing series. This will help avoid pointless crashes. * Updated message when duplicate series are found (not sure how this happens) * Fixed a negation for deleting volumes where files still exist. * Implemented the ability to automatically scale the manga reader based on screen size. * Default to automatic scaling * Fix an issue where malformed epubs wouldn't be readable due to incorrect keys in the OPF. We now check if key is valid and if not, try to correct it. This makes a page load about a second on malformed books. * Fixed #176. Refactored the recently added query to be restricted to user's access to libraries. * Fixed a one off bug with In Progress series * Implemented the ability to refresh metadata of just a single series directly
63 lines
2.7 KiB
C#
63 lines
2.7 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using API.DTOs;
|
|
using API.Entities;
|
|
using API.Helpers;
|
|
|
|
namespace API.Interfaces
|
|
{
|
|
public interface ISeriesRepository
|
|
{
|
|
void Add(Series series);
|
|
void Update(Series series);
|
|
Task<Series> GetSeriesByNameAsync(string name);
|
|
Task<bool> DoesSeriesNameExistInLibrary(string name);
|
|
Series GetSeriesByName(string name);
|
|
|
|
/// <summary>
|
|
/// Adds user information like progress, ratings, etc
|
|
/// </summary>
|
|
/// <param name="libraryId"></param>
|
|
/// <param name="userId"></param>
|
|
/// <param name="userParams"></param>
|
|
/// <returns></returns>
|
|
Task<PagedList<SeriesDto>> GetSeriesDtoForLibraryIdAsync(int libraryId, int userId, UserParams userParams);
|
|
|
|
/// <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);
|
|
Task<IEnumerable<VolumeDto>> GetVolumesDtoAsync(int seriesId, int userId);
|
|
Task<IEnumerable<Volume>> GetVolumes(int seriesId);
|
|
Task<SeriesDto> GetSeriesDtoByIdAsync(int seriesId, int userId);
|
|
Task<Volume> GetVolumeAsync(int volumeId);
|
|
Task<VolumeDto> GetVolumeDtoAsync(int volumeId, int userId);
|
|
/// <summary>
|
|
/// A fast lookup of just the volume information with no tracking.
|
|
/// </summary>
|
|
/// <param name="volumeId"></param>
|
|
/// <returns></returns>
|
|
Task<VolumeDto> GetVolumeDtoAsync(int volumeId);
|
|
Task<IEnumerable<Volume>> GetVolumesForSeriesAsync(int[] seriesIds);
|
|
Task<bool> DeleteSeriesAsync(int seriesId);
|
|
Task<Volume> GetVolumeByIdAsync(int volumeId);
|
|
Task<Series> GetSeriesByIdAsync(int seriesId);
|
|
Task<int[]> GetChapterIdsForSeriesAsync(int[] seriesIds);
|
|
/// <summary>
|
|
/// Used to add Progress/Rating information to series list.
|
|
/// </summary>
|
|
/// <param name="userId"></param>
|
|
/// <param name="series"></param>
|
|
/// <returns></returns>
|
|
Task AddSeriesModifiers(int userId, List<SeriesDto> series);
|
|
|
|
Task<byte[]> GetVolumeCoverImageAsync(int volumeId);
|
|
Task<byte[]> GetSeriesCoverImageAsync(int seriesId);
|
|
Task<IEnumerable<SeriesDto>> GetInProgress(int userId, int libraryId, int limit);
|
|
Task<IEnumerable<SeriesDto>> GetRecentlyAdded(int userId, int libraryId, int limit);
|
|
}
|
|
} |