Email service handles errors in try/catch more reliably.

Epub reader seems stable and working.
This commit is contained in:
Joseph Milazzo 2025-07-06 09:56:04 -05:00
parent 0206f376bc
commit f27308190d
4 changed files with 30 additions and 12 deletions

View file

@ -430,6 +430,23 @@ public class BookService : IBookService
}
private static void InjectImages(HtmlDocument doc, EpubBookRef book, string apiBase)
{
var images = doc.DocumentNode.SelectNodes("//img")
?? doc.DocumentNode.SelectNodes("//image") ?? doc.DocumentNode.SelectNodes("//svg");
if (images == null) return;
var parent = images[0].ParentNode;
foreach (var image in images)
{
// TODO: How do I make images clickable with state?
//image.AddClass("kavita-scale-width");
}
}
/// <summary>
/// Returns the image key associated with the file. Contains some basic fallback logic.
/// </summary>
@ -1092,6 +1109,8 @@ public class BookService : IBookService
ScopeImages(doc, book, apiBase);
InjectImages(doc, book, apiBase);
// Inject PTOC Bookmark Icons
InjectPTOCBookmarks(doc, book, ptocBookmarks);