Epub Table of Generation fixes for Sigil (#1689)
* Fixed generating table of contents where key lookup could fail with how Sigil packs the epubs. * Tweaked Kavita's fallback ToC generation (when one doesn't exist in the epub) to also use CoalesceKey. * Code smells
This commit is contained in:
parent
fcd9f8f118
commit
ebbaf2d060
13 changed files with 27 additions and 71 deletions
|
@ -246,21 +246,14 @@ public class Startup
|
|||
|
||||
app.UseMiddleware<ExceptionMiddleware>();
|
||||
|
||||
Task.Run(async () =>
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
var allowSwaggerUi = (await unitOfWork.SettingsRepository.GetSettingsDtoAsync())
|
||||
.EnableSwaggerUi;
|
||||
|
||||
if (env.IsDevelopment() || allowSwaggerUi)
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Kavita API " + BuildInfo.Version);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Kavita API " + BuildInfo.Version);
|
||||
});
|
||||
}
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue