feat: normalize subscription architecture, integrate pgvector, and implement Stripe webhook subscription management.
This commit is contained in:
@@ -41,7 +41,20 @@ public class EpubService : IEpubService
|
||||
return Result.Fail($"EPUB file not found. Checked {searchPaths.Count} locations, including: {string.Join(", ", searchPaths.Take(3))}");
|
||||
}
|
||||
|
||||
EpubBook book = await EpubReader.ReadBookAsync(fullPath);
|
||||
if (!File.Exists(fullPath))
|
||||
{
|
||||
return Result.Fail($"EPUB file at '{fullPath}' is not accessible or does not exist.");
|
||||
}
|
||||
|
||||
EpubBook book;
|
||||
try
|
||||
{
|
||||
book = await EpubReader.ReadBookAsync(fullPath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Result.Fail(new Error($"Failed to parse EPUB file. It might be corrupted or in use. Path: {fullPath}").CausedBy(ex));
|
||||
}
|
||||
var blocks = new List<ContentBlock>();
|
||||
int totalWordCount = 0;
|
||||
int blockCounter = 0;
|
||||
|
||||
Reference in New Issue
Block a user