Metadata Downloading (#3525)
This commit is contained in:
parent
eb66763078
commit
f4fd7230ea
108 changed files with 6296 additions and 484 deletions
|
@ -12,6 +12,7 @@ using API.SignalR.Presence;
|
|||
using Kavita.Common;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
|
@ -113,6 +114,8 @@ public static class ApplicationServiceExtensions
|
|||
});
|
||||
options.EnableDetailedErrors();
|
||||
options.EnableSensitiveDataLogging();
|
||||
options.ConfigureWarnings(warnings =>
|
||||
warnings.Ignore(RelationalEventId.PendingModelChangesWarning));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,18 +33,22 @@ public static class PlusMediaFormatExtensions
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
public static IList<MangaFormat> GetMangaFormats(this PlusMediaFormat? mediaFormat)
|
||||
{
|
||||
if (mediaFormat == null) return [MangaFormat.Archive];
|
||||
return mediaFormat.HasValue ? mediaFormat.Value.GetMangaFormats() : [MangaFormat.Archive];
|
||||
}
|
||||
|
||||
public static IList<MangaFormat> GetMangaFormats(this PlusMediaFormat mediaFormat)
|
||||
{
|
||||
return mediaFormat switch
|
||||
{
|
||||
PlusMediaFormat.Manga => [MangaFormat.Archive, MangaFormat.Image],
|
||||
PlusMediaFormat.Comic => [MangaFormat.Archive],
|
||||
PlusMediaFormat.LightNovel => [MangaFormat.Epub, MangaFormat.Pdf],
|
||||
PlusMediaFormat.Book => [MangaFormat.Epub, MangaFormat.Pdf],
|
||||
PlusMediaFormat.Unknown => [MangaFormat.Archive],
|
||||
_ => [MangaFormat.Archive]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue