confighantering. connection t postgres. test av import

This commit is contained in:
2025-09-06 16:53:23 +02:00
parent 1744a5b7de
commit 8c54a120d1
9 changed files with 341 additions and 22 deletions

View File

@@ -3,12 +3,12 @@ using Bibblan.ViewModels;
using Microsoft.Extensions.Options;
namespace Bibblan.Business.Services
{
{
public class CalibreService
{
private readonly BibblanOptions _options;
CalibreContext _context;
public CalibreService(CalibreContext context, IOptions<BibblanOptions> options)
SqliteCalibreContext _context;
public CalibreService(SqliteCalibreContext context, IOptions<BibblanOptions> options)
{
_options = options.Value;
_context = context;
@@ -43,7 +43,7 @@ namespace Bibblan.Business.Services
Comments = comment.Text,
Language = l.LangCode,
Path = b.Path,
HasCover = b.HasCover == "1",
HasCover = b.HasCover,// == "1",
Formats = (from d in _context.Data where d.Book == b.Id orderby d.Format select new DataVm { Id = d.Id, Format = d.Format, FileName = d.Name + "." + d.Format.ToLower() }).ToList(),
SeriesName = s.Name,
SeriesNumber = b.SeriesIndex