mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
541 B
14 lines
541 B
using ErsatzTV.Core; |
|
using ErsatzTV.Core.Interfaces.Images; |
|
|
|
namespace ErsatzTV.Application.Images; |
|
|
|
public class SaveArtworkToDiskHandler : IRequestHandler<SaveArtworkToDisk, Either<BaseError, string>> |
|
{ |
|
private readonly IImageCache _imageCache; |
|
|
|
public SaveArtworkToDiskHandler(IImageCache imageCache) => _imageCache = imageCache; |
|
|
|
public Task<Either<BaseError, string>> Handle(SaveArtworkToDisk request, CancellationToken cancellationToken) => |
|
_imageCache.SaveArtworkToCache(request.Stream, request.ArtworkKind); |
|
}
|
|
|