Kavita/API/Interfaces/IBookService.cs
Joseph Milazzo 35a47f5d88
Book Feedback and small bugs (#183)
* 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.
2021-04-29 17:52:34 -05:00

23 lines
819 B
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using API.Parser;
using VersOne.Epub;
namespace API.Interfaces
{
public interface IBookService
{
int GetNumberOfPages(string filePath);
byte[] GetCoverImage(string fileFilePath, bool createThumbnail = true);
Task<Dictionary<string, int>> CreateKeyToPageMappingAsync(EpubBookRef book);
/// <summary>
/// Scopes styles to .reading-section and replaces img src to the passed apiBase
/// </summary>
/// <param name="stylesheetHtml"></param>
/// <param name="apiBase"></param>
/// <returns></returns>
Task<string> ScopeStyles(string stylesheetHtml, string apiBase);
string GetSummaryInfo(string filePath);
ParserInfo ParseInfo(string filePath);
}
}