Migrated up to VersOne 3.3 with epub 3.3 support. (#1999)
This enables collection and reading list support from epubs.
This commit is contained in:
parent
466a0c8028
commit
1b06d98319
6 changed files with 71 additions and 179 deletions
|
@ -98,9 +98,9 @@ public class BookController : BaseApiController
|
|||
using var book = await EpubReader.OpenBookAsync(chapter.Files.ElementAt(0).FilePath, BookService.BookReaderOptions);
|
||||
|
||||
var key = BookService.CoalesceKeyForAnyFile(book, file);
|
||||
if (!book.Content.AllFiles.ContainsKey(key)) return BadRequest("File was not found in book");
|
||||
if (!book.Content.AllFiles.Local.ContainsKey(key)) return BadRequest("File was not found in book");
|
||||
|
||||
var bookFile = book.Content.AllFiles[key];
|
||||
var bookFile = book.Content.AllFiles.Local[key];
|
||||
var content = await bookFile.ReadContentAsBytesAsync();
|
||||
|
||||
var contentType = BookService.GetContentType(bookFile.ContentType);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue