blandat.. fixar o nullcheckar. filtreringar

This commit is contained in:
2025-09-16 00:19:54 +02:00
parent f88c25f117
commit 6efa8aba8a
9 changed files with 114 additions and 43 deletions

View File

@@ -1,5 +1,6 @@
using Bibblan.Models;
using Bibblan.ViewModels;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.Extensions.Options;
namespace Bibblan.Business.Services
@@ -17,6 +18,9 @@ namespace Bibblan.Business.Services
public byte[] Cover(string path)
{
var fullPath = Path.Combine(_options.CalibreRoot, path, "cover.jpg");
if (!File.Exists(fullPath))
return null;
return File.ReadAllBytes(fullPath);
}