blandat.. fixar o nullcheckar. filtreringar
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user