Metadata Downloading (#3525)

This commit is contained in:
Joe Milazzo 2025-02-05 16:16:44 -06:00 committed by GitHub
parent eb66763078
commit f4fd7230ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
108 changed files with 6296 additions and 484 deletions

View file

@ -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));
});
}
}

View file

@ -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]
};
}
}